File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
rules/CodeQuality/Rector/StmtsAwareInterface Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff 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+
Original file line number Diff line number Diff line change 88use PhpParser \Node \Stmt ;
99use PhpParser \Node \Stmt \Class_ ;
1010use PhpParser \Node \Stmt \Nop ;
11- use PhpParser \NodeVisitor ;
1211use Rector \ChangesReporting \ValueObject \RectorWithLineChange ;
1312use Rector \Contract \Rector \HTMLAverseRectorInterface ;
1413use 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
You can’t perform that action at this time.
0 commit comments