Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

Commit

Permalink
Feature: Migrate to PhpParser v4
Browse files Browse the repository at this point in the history
  • Loading branch information
ovr committed Feb 27, 2019
1 parent 8419d75 commit 269912c
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"symfony/event-dispatcher": "^3.3.6 || ^4.0",
"symfony/config": "^3.3.6 || ^4.0",
"symfony/yaml": "^3.3.6 || ^4.0",
"nikic/php-parser": "^3.1",
"nikic/php-parser": "^4.2.1",
"phpdocumentor/reflection-docblock": "^4.3",
"phpdocumentor/type-resolver": "^0.4",
"webiny/event-manager": "^1.4.1",
Expand Down
12 changes: 11 additions & 1 deletion src/Node/Scalar/Boolean.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,19 @@ public function __construct($value, array $attributes = array())
/**
* @return array
*/
public function getSubNodeNames()
public function getSubNodeNames(): array
{
return ['value'];
}
//@codeCoverageIgnoreEnd

/**
* Gets the type of the node.
*
* @return string Type of the node
*/
public function getType(): string
{
return 'Scalar_Boolean';
}
}
12 changes: 11 additions & 1 deletion src/Node/Scalar/Fake.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,19 @@ public function __construct($value, $type, array $attributes = array())
/**
* @return array
*/
public function getSubNodeNames()
public function getSubNodeNames(): array
{
return ['value', 'type'];
}
//@codeCoverageIgnoreEnd

/**
* Gets the type of the node.
*
* @return string Type of the node
*/
public function getType(): string
{
return 'Fake';
}
}
12 changes: 11 additions & 1 deletion src/Node/Scalar/Nil.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,19 @@ public function __construct($value = null, array $attributes = array())
/**
* @return array
*/
public function getSubNodeNames()
public function getSubNodeNames(): array
{
return ['value'];
}
//@codeCoverageIgnoreEnd

/**
* Gets the type of the node.
*
* @return string Type of the node
*/
public function getType(): string
{
return 'Scalar_Nil';
}
}

0 comments on commit 269912c

Please sign in to comment.