@@ -28,32 +28,7 @@ public function __construct(
2828
2929 public function parseFilePathToFile (string $ filePath ): File
3030 {
31- <<<<<<< HEAD
32- <<<<<<< HEAD
3331 [$ file , $ stmts ] = $ this ->parseToFileAndStmts ($ filePath );
34- <<<<<<< HEAD
35- =======
36- // needed for PHPStan reflection, as it caches the last processed file
37- $ this ->dynamicSourceLocatorProvider ->setFilePath ($ filePath );
38-
39- $ fileContent = FileSystem ::read ($ filePath );
40- $ file = new File ($ filePath , $ fileContent );
41- $ stmts = $ this ->rectorParser ->parseString ($ fileContent );
42-
43- // wrap in FileNode to enable file-level rules
44- $ stmts = [new FileNode ($ stmts )];
45-
46- $ stmts = $ this ->nodeScopeAndMetadataDecorator ->decorateNodesFromFile ($ filePath , $ stmts );
47-
48- $ file ->hydrateStmtsAndTokens ($ stmts , $ stmts , []);
49- $ this ->currentFileProvider ->setFile ($ file );
50- >>>>>>> 2751658832 (introduce FileNode to handle file-level changes; deprecate IncreaseDeclareStrictTypesRector)
51- =======
52- [$ file , $ stmts ] = $ this ->parseToFileAndStmts ($ filePath );
53- >>>>>>> 8e51776 f69 (cleanup phpstan errors)
54-
55- =======
56- >>>>>>> 90002 f8aee (extract LaravelClassName)
5732 return $ file ;
5833 }
5934
@@ -64,37 +39,10 @@ public function parseFileToDecoratedNodes(string $filePath): array
6439 {
6540 [$ file , $ stmts ] = $ this ->parseToFileAndStmts ($ filePath );
6641 return $ stmts ;
67- <<<<<<< HEAD
68- <<<<<<< HEAD
6942 }
7043
7144 /**
7245 * @return array{0: File, 1: Node[]}
73- =======
74- //
75- // // needed for PHPStan reflection, as it caches the last processed file
76- // $this->dynamicSourceLocatorProvider->setFilePath($filePath);
77- //
78- // $fileContent = FileSystem::read($filePath);
79- // $stmts = $this->rectorParser->parseString($fileContent);
80- // $file = new File($filePath, $fileContent);
81- //
82- // // wrap in FileNode to enable file-level rules
83- // $stmts = [new FileNode($stmts)];
84- //
85- // $stmts = $this->nodeScopeAndMetadataDecorator->decorateNodesFromFile($filePath, $stmts);
86- // $file->hydrateStmtsAndTokens($stmts, $stmts, []);
87- //
88- // $this->currentFileProvider->setFile($file);
89- //
90- // return $stmts;
91- =======
92- >>>>>>> 90002f8aee (extract LaravelClassName)
93- }
94-
95- /**
96- * @return array{0: File, 1: Node\Stmt[]}
97- >>>>>>> 8e51776f69 (cleanup phpstan errors)
9846 */
9947 private function parseToFileAndStmts (string $ filePath ): array
10048 {
@@ -105,16 +53,8 @@ private function parseToFileAndStmts(string $filePath): array
10553 $ file = new File ($ filePath , $ fileContent );
10654 $ stmts = $ this ->rectorParser ->parseString ($ fileContent );
10755
108- <<<<<<< HEAD
109- $ stmts = $ this ->rectorParser ->parseString ($ fileContent );
110- =======
11156 // wrap in FileNode to enable file-level rules
11257 $ stmts = [new FileNode ($ stmts )];
113- <<<<<<< HEAD
114-
115- >>>>>>> 2751658832 (introduce FileNode to handle file-level changes; deprecate IncreaseDeclareStrictTypesRector)
116- =======
117- >>>>>>> 90002 f8aee (extract LaravelClassName)
11858 $ stmts = $ this ->nodeScopeAndMetadataDecorator ->decorateNodesFromFile ($ filePath , $ stmts );
11959
12060 $ file ->hydrateStmtsAndTokens ($ stmts , $ stmts , []);
0 commit comments