opensourcepos
opensourcepos copied to clipboard
PSR-2 Compliance issue: Closing `?>` tag in files that contain only PHP
Background information
According to the PSR-2 coding standard (which CI code adhere's to), we should be leaving off the closing ?> tag in files that only contain PHP (i.e., Models, Controllers, Helpers, Libraries)
See Section 2.2 (https://www.php-fig.org/psr/psr-2/)
- PHPStorm is complaining about it.
- The accepted answer in this stackoverflow question gives some really good reasons to do it: https://stackoverflow.com/questions/4410704/why-would-one-omit-the-close-tag. It's an old answer, but I think it's still relevant.
Fine by me.
If we consider doing these kind of changes, then it might be best to do it in one go and one commit.
Agreed. We need to make it a single commit in it's own PR rather than piggybacking on another PR.
Looks like this is done in ci4-branch