mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
update to php-parser 4.2.2
This commit is contained in:
parent
641ac4f08f
commit
1d24dae9df
@ -12,7 +12,7 @@
|
||||
"jetbrains/phpstorm-stubs": "^2019.1",
|
||||
"nette/robot-loader": "^3.1",
|
||||
"nette/utils": "^2.5|^3.0",
|
||||
"nikic/php-parser": "^4.2.1",
|
||||
"nikic/php-parser": "^4.2.2",
|
||||
"phpstan/phpdoc-parser": "0.3.3",
|
||||
"phpstan/phpstan": "0.11.6",
|
||||
"sebastian/diff": "^3.0",
|
||||
|
@ -9,10 +9,6 @@ final class ClosureToArrowFunctionRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(): void
|
||||
{
|
||||
if (! class_exists('PhpParser\Node\Expr\ArrowFunction')) {
|
||||
$this->markTestSkipped('Waits on php-parser release');
|
||||
}
|
||||
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/fixture.php.inc',
|
||||
__DIR__ . '/Fixture/referenced_but_not_used.php.inc',
|
||||
|
@ -9,10 +9,6 @@ final class ArraySpreadInsteadOfArrayMergeRectorTest extends AbstractRectorTestC
|
||||
{
|
||||
public function test(): void
|
||||
{
|
||||
if (! class_exists('PhpParser\Node\Expr\ArrowFunction')) {
|
||||
$this->markTestSkipped('Waits on php-parser release');
|
||||
}
|
||||
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/fixture.php.inc',
|
||||
__DIR__ . '/Fixture/iterator_to_array.php.inc',
|
||||
|
@ -34,7 +34,8 @@ class DeliveryTest extends \PHPUnit\Framework\TestCase
|
||||
$factory = $this->createMock(DeliveryFactory::class);
|
||||
/** @var ShippingMethod|\PHPUnit\Framework\MockObject\MockObject $shippingMethod */
|
||||
$shippingMethod = $this->createMock(ShippingMethod::class);
|
||||
$factory->expects($this->atLeastOnce())->method('createShippingMethodFor')->with($this->equalTo(5))
|
||||
$factory->expects($this->atLeastOnce())
|
||||
->method('createShippingMethodFor')->with($this->equalTo(5))
|
||||
->willReturn($shippingMethod);
|
||||
}
|
||||
}
|
||||
|
@ -70,21 +70,20 @@ final class BetterStandardPrinter extends Standard
|
||||
* @param mixed[] $nodes
|
||||
* @param mixed[] $origNodes
|
||||
* @param int|null $fixup
|
||||
* @param string|null $insertStr
|
||||
*/
|
||||
public function pArray(
|
||||
array $nodes,
|
||||
array $origNodes,
|
||||
int &$pos,
|
||||
int $indentAdjustment,
|
||||
string $parentNodeType,
|
||||
string $subNodeName,
|
||||
$fixup,
|
||||
$insertStr
|
||||
$fixup
|
||||
): ?string {
|
||||
// reindex positions for printer
|
||||
$nodes = array_values($nodes);
|
||||
|
||||
return parent::pArray($nodes, $origNodes, $pos, $indentAdjustment, $subNodeName, $fixup, $insertStr);
|
||||
return parent::pArray($nodes, $origNodes, $pos, $indentAdjustment, $parentNodeType, $subNodeName, $fixup);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user