mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-22 18:54:39 +01:00
[CodingStyle] Skip unknown method name for CallUserFuncCallToVariadicRector [closes #2430]
This commit is contained in:
parent
a291af867b
commit
9eb47d1280
@ -63,9 +63,13 @@ PHP
|
||||
}
|
||||
|
||||
$functionName = $this->getValue($node->args[0]->value);
|
||||
if (! is_string($functionName)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$args = [];
|
||||
$args[] = new Arg($node->args[1]->value, false, true);
|
||||
|
||||
return $this->createFunction($functionName, $args);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\CodingStyle\Tests\Rector\FuncCall\CallUserFuncCallToVariadicRector\Fixture;
|
||||
|
||||
class SkipUnknownValue
|
||||
{
|
||||
public function run($name)
|
||||
{
|
||||
call_user_func_array($name, $items);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user