Remove php closing tags in php-only files
As per PHP documentation (https://www.php.net/basic-syntax.phptags)
If a file contains only PHP code, it is preferable to omit the PHP closing tag at the end of the file. This prevents accidental whitespace or new lines being added after the PHP closing tag, which may cause unwanted effects because PHP will start output buffering when there is no intention from the programmer to send any output at that point in the script.
An example of a problem related to using closing php tags is the one described here: http://vtiger-crm.2324883.n4.nabble.com/Vtigercrm-developers-closing-php-tag-and-corrupted-excel-files-td23163.html
PSR-12 standard (https://www.php-fig.org/psr/psr-12/) has it as part of its guidelines:
The closing ?> tag MUST be omitted from files containing only PHP.