Skip to content

Commit b84c0de

Browse files
committed
cs
1 parent dcccb8d commit b84c0de

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

phpstan.neon

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,10 @@ parameters:
4848
identifier: assign.propertyType
4949
message: '#Property PhpParser\\Node\\Identifier\:\:\$name \(non\-empty\-string\) does not accept string#'
5050
path: rules/CodeQuality/Rector/ClassMethod/ReplaceTestFunctionPrefixWithAttributeRector.php
51+
52+
53+
# special case for namespace file
54+
-
55+
identifier: rector.noOnlyNullReturnInRefactor
56+
path: rules/CodeQuality/Rector/StmtsAwareInterface/DeclareStrictTypesTestsRector.php
57+

rules/CodeQuality/Rector/StmtsAwareInterface/DeclareStrictTypesTestsRector.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use PhpParser\Node\Stmt;
99
use PhpParser\Node\Stmt\Class_;
1010
use PhpParser\Node\Stmt\Nop;
11-
use PhpParser\NodeVisitor;
1211
use Rector\ChangesReporting\ValueObject\RectorWithLineChange;
1312
use Rector\Contract\Rector\HTMLAverseRectorInterface;
1413
use Rector\PhpParser\Enum\NodeGroup;
@@ -127,11 +126,11 @@ public function getNodeTypes(): array
127126
/**
128127
* @param StmtsAware $node
129128
*/
130-
public function refactor(Node $node): int
129+
public function refactor(Node $node): null
131130
{
132131
// workaround, as Rector now only hooks to specific nodes, not arrays
133132
// avoid traversing, as we already handled in beforeTraverse()
134-
return NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN;
133+
return null;
135134
}
136135

137136
public function provideMinPhpVersion(): int

0 commit comments

Comments
 (0)