@@ -70,12 +70,12 @@ private function warmupCache(CodeNode $node, IssueCollection $issues, string $ap
7070 return ;
7171 }
7272
73- $ issues ->addIssue (new Issue ($ node , trim ($ process ->getErrorOutput ()), 'Cache Warmup ' , $ node ->getEnvironment ()->getCurrentFileName (), count (explode (PHP_EOL , $ node ->getValue ())) - 1 ));
73+ $ issues ->addIssue (new Issue ($ node , trim ($ process ->getErrorOutput ()), 'Cache Warmup ' , $ node ->getEnvironment ()->getCurrentFileName (), count (explode ("\n" , $ node ->getValue ())) - 1 ));
7474 }
7575
7676 private function getFile (CodeNode $ node ): string
7777 {
78- $ contents = explode (PHP_EOL , $ node ->getValue ());
78+ $ contents = explode ("\n" , $ node ->getValue ());
7979 $ regex = match ($ node ->getLanguage ()) {
8080 'php ' => '|^// ?([a-z1-9A-Z_\-/]+\.php)$| ' ,
8181 'yaml ' => '|^# ?([a-z1-9A-Z_\-/]+\.yaml)$| ' ,
@@ -94,14 +94,14 @@ private function getNodeContents(CodeNode $node): string
9494 {
9595 $ language = $ node ->getLanguage ();
9696 if ('php ' === $ language ) {
97- return '<?php ' .PHP_EOL .$ node ->getValue ();
97+ return '<?php ' ."\n" .$ node ->getValue ();
9898 }
9999
100100 if ('xml ' === $ language ) {
101- $ contents = explode (PHP_EOL , $ node ->getValue ());
101+ $ contents = explode ("\n" , $ node ->getValue ());
102102 unset($ contents [0 ]);
103103
104- return implode (PHP_EOL , $ contents );
104+ return implode ("\n" , $ contents );
105105 }
106106
107107 return $ node ->getValue ();
0 commit comments