Closed samsonasik closed 3 months ago
when code is generated code or being read by some tool may cause multiple different line endings, so can't rely on PHP_EOL, use \r?\n regex instead,
PHP_EOL
\r?\n
see https://3v4l.org/Y8pSD
The behaviour is same with Rector's NewLineSplitter https://github.com/rectorphp/rector-src/blob/a16a04d0bc90df11918efd4b7fc117a9e3dcc1c3/src/Util/NewLineSplitter.php#L15-L23
NewLineSplitter
All checks have passed 🎉 @TomasVotruba I think it is ready.
Thanks :+1:
when code is generated code or being read by some tool may cause multiple different line endings, so can't rely on
PHP_EOL
, use\r?\n
regex instead,see https://3v4l.org/Y8pSD
The behaviour is same with Rector's
NewLineSplitter
https://github.com/rectorphp/rector-src/blob/a16a04d0bc90df11918efd4b7fc117a9e3dcc1c3/src/Util/NewLineSplitter.php#L15-L23