It's not the line endings. Sometimes I use the Linux texteditor gedit which automatically inserts an empty line at the end of a file. As stated here*, for php files this is PSR2.
*https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md#22-files