Skip to content

Commit e53b2fa

Browse files
committed
print stmts with false
1 parent 77056cd commit e53b2fa

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

rules/TypeDeclaration/Rector/StmtsAwareInterface/DeclareStrictTypesRector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Rector\TypeDeclaration\Rector\StmtsAwareInterface;
66

77
use PhpParser\Node;
8-
use PhpParser\Node\Stmt;
98
use PhpParser\Node\Stmt\Nop;
109
use Rector\Contract\Rector\HTMLAverseRectorInterface;
1110
use Rector\PhpParser\Node\FileNode;

src/PhpParser/Node/CustomNode/FileWithoutNamespace.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace Rector\PhpParser\Node\CustomNode;
66

77
use PhpParser\Node\Stmt;
8+
use Rector\Contract\PhpParser\Node\StmtsAwareInterface;
89
use Rector\PhpParser\Node\FileNode;
910

1011
/**
@@ -13,7 +14,7 @@
1314
*
1415
* Inspired by https://github.com/phpstan/phpstan-src/commit/ed81c3ad0b9877e6122c79b4afda9d10f3994092
1516
*/
16-
final class FileWithoutNamespace extends FileNode
17+
final class FileWithoutNamespace extends FileNode implements StmtsAwareInterface
1718
{
1819
/**
1920
* @param Stmt[] $stmts

src/PhpParser/Printer/BetterStandardPrinter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ protected function p(
159159

160160
protected function pStmt_FileNode(FileNode $fileNode): string
161161
{
162-
return $this->pStmts($fileNode->stmts, true);
162+
return $this->pStmts($fileNode->stmts);
163163
}
164164

165165
protected function pExpr_ArrowFunction(ArrowFunction $arrowFunction, int $precedence, int $lhsPrecedence): string

src/ValueObject/Application/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,6 @@ public function getFileNode(): ?FileNode
221221

222222
public function hasShebang(): bool
223223
{
224-
return str_starts_with($this->getFileContent(), '#!');
224+
return str_starts_with($this->fileContent, '#!');
225225
}
226226
}

0 commit comments

Comments
 (0)