Closed arendjantetteroo closed 1 month ago
OK @arendjantetteroo as far as I can tell, this would largely be a case of running part of the codebase through something like PHP codesniffer, right?
Once we have this, we can then think about either adding it to CI pipeline, or locally with something like Pre-Commit
Some of it might be automatically fixed by php-cs-fixer maybe, others might need some manual changes.
pre-commit should help yes.
Code style should be ok now (except for maybe a few small issues here and there).
Still to do : add a pre-commit hook.
Hey @arendjantetteroo , I'm not familiar enough with php to know the idiomatic way to do this, but the approach I see with phpunit, is that installing it with composer gives us ./bin/phpunit
that we can call easily.
Do we have an equivalent for code style in php, like ./bin/some-handy-binary
?
If so, I'm thinking that, plus some read me instruction on how to set up pre-commit might be sufficient.
WDYT?
php-cs-fixer is the name :)
Some parts still look like the php4 age with _ for properties.