@@ -70,12 +70,12 @@ private function warmupCache(CodeNode $node, IssueCollection $issues, string $ap
70
70
return ;
71
71
}
72
72
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 ));
74
74
}
75
75
76
76
private function getFile (CodeNode $ node ): string
77
77
{
78
- $ contents = explode (PHP_EOL , $ node ->getValue ());
78
+ $ contents = explode ("\n" , $ node ->getValue ());
79
79
$ regex = match ($ node ->getLanguage ()) {
80
80
'php ' => '|^// ?([a-z1-9A-Z_\-/]+\.php)$| ' ,
81
81
'yaml ' => '|^# ?([a-z1-9A-Z_\-/]+\.yaml)$| ' ,
@@ -94,14 +94,14 @@ private function getNodeContents(CodeNode $node): string
94
94
{
95
95
$ language = $ node ->getLanguage ();
96
96
if ('php ' === $ language ) {
97
- return '<?php ' .PHP_EOL .$ node ->getValue ();
97
+ return '<?php ' ."\n" .$ node ->getValue ();
98
98
}
99
99
100
100
if ('xml ' === $ language ) {
101
- $ contents = explode (PHP_EOL , $ node ->getValue ());
101
+ $ contents = explode ("\n" , $ node ->getValue ());
102
102
unset($ contents [0 ]);
103
103
104
- return implode (PHP_EOL , $ contents );
104
+ return implode ("\n" , $ contents );
105
105
}
106
106
107
107
return $ node ->getValue ();
0 commit comments