Skip to content

Commit e226524

Browse files
authored
Revert "[TypeDeclaration] Skip with include on SafeDeclareStrictTypesRector (…" (#7863)
This reverts commit 367edb5.
1 parent 367edb5 commit e226524

File tree

3 files changed

+1
-27
lines changed

3 files changed

+1
-27
lines changed

rules-tests/TypeDeclaration/Rector/StmtsAwareInterface/SafeDeclareStrictTypesRector/Fixture/skip_with_include_file.php.inc

Lines changed: 0 additions & 8 deletions
This file was deleted.

rules-tests/TypeDeclaration/Rector/StmtsAwareInterface/SafeDeclareStrictTypesRector/Source/NonTypedApp.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

rules/TypeDeclaration/NodeAnalyzer/StrictTypeSafetyChecker.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use PhpParser\Node\Attribute;
99
use PhpParser\Node\Expr\Assign;
1010
use PhpParser\Node\Expr\CallLike;
11-
use PhpParser\Node\Expr\Include_;
1211
use PhpParser\Node\Expr\PropertyFetch;
1312
use PhpParser\Node\Expr\StaticPropertyFetch;
1413
use PhpParser\Node\FunctionLike;
@@ -69,8 +68,7 @@ public function isFileStrictTypeSafe(FileNode $fileNode): bool
6968
}
7069
}
7170

72-
$includes = $this->betterNodeFinder->findInstanceOf($fileNode->stmts, Include_::class);
73-
return $includes === [];
71+
return true;
7472
}
7573

7674
private function isCallLikeSafe(CallLike $callLike): bool

0 commit comments

Comments
 (0)