File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -31,34 +31,31 @@ public function rotate(string $file): ?string
3131 return null ;
3232 }
3333
34- $ this ->initProcessorFile ($ file );
35-
3634 $ fileRotate = $ this ->moveContentToTempFile ($ file );
3735
38- return $ this ->runProcessors ($ fileRotate );
36+ return $ this ->runProcessors ($ file , $ fileRotate );
3937 }
4038
4139 /**
4240 * Run all processors
4341 *
44- * @param string|null $fileRotate
42+ * @param string $originalFile
43+ * @param string|null $fileRotated
4544 * @return string|null
4645 */
47- private function runProcessors (?string $ fileRotate ): ?string
46+ private function runProcessors (string $ originalFile , ?string $ fileRotated ): ?string
4847 {
49- if (!$ fileRotate ) {
50- return null ;
51- }
48+ $ this ->initProcessorFile ($ originalFile );
5249
5350 foreach ($ this ->processors as $ processor ) {
54- $ fileRotate = $ processor ->handler ($ fileRotate );
55-
56- if (!$ fileRotate ) {
51+ if (!$ fileRotated ) {
5752 return null ;
5853 }
54+
55+ $ fileRotated = $ processor ->handler ($ fileRotated );
5956 }
6057
61- return $ fileRotate ;
58+ return $ fileRotated ;
6259 }
6360
6461 /**
You can’t perform that action at this time.
0 commit comments