Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add strict type coding standard (#6039)
Previous attempts to force type hints or strict typing en masse have failed because it's just too darn complicated to do it all at once. This introduces a new Strict Type coding standard that we can selectively apply to files by adding to an array in test/run-php-linter.sh. Hopefully this will provide an approach to using stricter typing that is easier to author and review. Using vendor/bin/phpcbf --standard=test/StrictTypesCS.xml $file will now allow PHPCBF to automatically provide return types param types strict_types =1 based on PHPDocs. It will also throw errors if Traversable types do not have specific type annotations. The Database.class.inc file has been modified as an example of the changes Resolves #5342
- Loading branch information