File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 55namespace Rector \RectorCompatTests \Rector ;
66
77use PhpParser \Node ;
8- use PhpParser \Node \Stmt \ Class_ ;
8+ use PhpParser \Node \Stmt ;
99use PhpParser \Node \Stmt \If_ ;
1010use PhpParser \Node \Stmt \Nop ;
1111use Rector \Contract \PhpParser \Node \StmtsAwareInterface ;
1414final class MakeNewlineAfterIfRector extends AbstractRector
1515{
1616 /**
17- * @return array<class-string<Class_ >>
17+ * @return array<class-string<Node >>
1818 */
1919 public function getNodeTypes (): array
2020 {
21- return [StmtsAwareInterface::class];
21+ // local PHPUnit
22+ if (is_dir (__DIR__ . '/../../vendor/phpunit ' )) {
23+ return [StmtsAwareInterface::class];
24+ }
25+
26+ return [If_::class];
2227 }
2328
2429 /**
25- * @param StmtsAwareInterface $node
30+ * @param StmtsAwareInterface|If_ $node
2631 * @return array<Node>|null
2732 */
2833 public function refactor (Node $ node ): ?array
You can’t perform that action at this time.
0 commit comments