This commit is contained in:
TomasVotruba 2017-09-05 23:56:02 +02:00
parent 4e95278f0a
commit 33860366f0
2 changed files with 4 additions and 6 deletions

View File

@ -4,7 +4,6 @@ namespace Rector\NodeFactory;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\ArrayItem;
use PhpParser\Node\Expr\ClassConstFetch;
@ -95,7 +94,7 @@ final class NodeFactory
* @param mixed[] $arguments
* @return Arg[]
*/
public function createArgs(...$arguments): array
public function createArgs(array $arguments): array
{
$args = [];
foreach ($arguments as $argument) {

View File

@ -3,7 +3,6 @@
namespace Rector\Rector\Contrib\Nette;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr\ClassConstFetch;
use PhpParser\Node\Expr\MethodCall;
use Rector\Deprecation\SetNames;
@ -76,9 +75,9 @@ final class FormSetRequiredRector extends AbstractRector
public function refactor(Node $node): ?Node
{
$node->name->name = 'setRequired';
$node->args = $this->nodeFactory->createArgs(
$this->nodeFactory->createFalseConstant()
);
$node->args = $this->nodeFactory->createArgs([
$this->nodeFactory->createFalseConstant(),
]);
return $node;
}