This commit is contained in:
TomasVotruba 2017-11-18 00:05:02 +01:00
parent f639587788
commit 4133d2cc25
3 changed files with 6 additions and 4 deletions

View File

@ -40,6 +40,10 @@ parameters:
- PhpCsFixer\Fixer\Phpdoc\PhpdocToCommentFixer
skip:
Symplify\CodingStandard\Fixer\Commenting\RemoveUselessDocBlockFixer:
# bugged
- src/Node/NodeFactory.php
Symplify\CodingStandard\Sniffs\DependencyInjection\NoClassInstantiationSniff:
# already fixed in master
- bin/rector.php

View File

@ -27,9 +27,6 @@ final class ServiceDefinition
{
if (func_num_args() > 1) {
@trigger_error(__METHOD__ . '() second parameter $args is deprecated, use setFactory()', E_USER_DEPRECATED);
if ($args = func_get_arg(1)) {
$this->setFactory($type, $args);
}
}
return $this;

View File

@ -56,7 +56,8 @@ abstract class AbstractRector extends NodeVisitorAbstract implements RectorInter
final public function enterNode(Node $node)
{
if ($this->isCandidate($node)) {
if ($newNode = $this->refactor($node)) {
$newNode = $this->refactor($node);
if ($newNode !== null) {
return $newNode;
}