@@ -28,6 +28,7 @@ public function __construct(
2828
2929 public function parseFilePathToFile (string $ filePath ): File
3030 {
31+ <<<<<<< HEAD
3132<<<<<<< HEAD
3233 [$ file , $ stmts ] = $ this ->parseToFileAndStmts ($ filePath );
3334=======
@@ -46,6 +47,9 @@ public function parseFilePathToFile(string $filePath): File
4647 $ file ->hydrateStmtsAndTokens ($ stmts , $ stmts , []);
4748 $ this ->currentFileProvider ->setFile ($ file );
4849>>>>>>> 2751658832 (introduce FileNode to handle file-level changes; deprecate IncreaseDeclareStrictTypesRector)
50+ =======
51+ [$ file , $ stmts ] = $ this ->parseToFileAndStmts ($ filePath );
52+ >>>>>>> 8e51776 f69 (cleanup phpstan errors)
4953
5054 return $ file ;
5155 }
@@ -58,10 +62,34 @@ public function parseFileToDecoratedNodes(string $filePath): array
5862 [$ file , $ stmts ] = $ this ->parseToFileAndStmts ($ filePath );
5963
6064 return $ stmts ;
65+ <<<<<<< HEAD
6166 }
6267
6368 /**
6469 * @return array{0: File, 1: Node[]}
70+ =======
71+ //
72+ // // needed for PHPStan reflection, as it caches the last processed file
73+ // $this->dynamicSourceLocatorProvider->setFilePath($filePath);
74+ //
75+ // $fileContent = FileSystem::read($filePath);
76+ // $stmts = $this->rectorParser->parseString($fileContent);
77+ // $file = new File($filePath, $fileContent);
78+ //
79+ // // wrap in FileNode to enable file-level rules
80+ // $stmts = [new FileNode($stmts)];
81+ //
82+ // $stmts = $this->nodeScopeAndMetadataDecorator->decorateNodesFromFile($filePath, $stmts);
83+ // $file->hydrateStmtsAndTokens($stmts, $stmts, []);
84+ //
85+ // $this->currentFileProvider->setFile($file);
86+ //
87+ // return $stmts;
88+ }
89+
90+ /**
91+ * @return array{0: File, 1: Node\Stmt[]}
92+ >>>>>>> 8e51776f69 (cleanup phpstan errors)
6593 */
6694 private function parseToFileAndStmts (string $ filePath ): array
6795 {
@@ -70,6 +98,7 @@ private function parseToFileAndStmts(string $filePath): array
7098
7199 $ fileContent = FileSystem::read ($ filePath );
72100 $ file = new File ($ filePath , $ fileContent );
101+ $ stmts = $ this ->rectorParser ->parseString ($ fileContent );
73102
74103<<<<<<< HEAD
75104 $ stmts = $ this ->rectorParser ->parseString ($ fileContent );
0 commit comments