timmit / phpcs-framework-rules
PHPCS rules shared by aItem applications.
Package info
git.timmit.nl/timmit/phpcs-framework-rules
Type:phpcodesniffer-standard
pkg:composer/timmit/phpcs-framework-rules
v1.1.0
2026-10-10 14:03 UTC
Requires
- php: >=8.2
- dealerdirect/phpcodesniffer-composer-installer: ^1.0
- squizlabs/php_codesniffer: ^4.0
Requires (Dev)
- phpunit/phpunit: ^11.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
PHPCS rules shared by applications on an aItem based framework.
Install
composer require --dev timmit/phpcs-framework-rules
Allow the PHPCS Composer installer in the root composer.json:
{
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
The installer registers the TiMMiT standard. Check with vendor/bin/phpcs -i.
Usage
PSR1 includes Squiz.Classes.ValidClassName, which only allows PascalCase. Exclude that sniff and use this standard instead:
<rule ref="PSR1">
<exclude name="Squiz.Classes.ValidClassName"/>
</rule>
<rule ref="TiMMiT"/>
Class names
| Kind | Name |
|---|---|
| Abstract class | lowercase a, then PascalCase: aItem, aConnector |
| Trait | lowercase t, then PascalCase: tItem |
| Interface | lowercase i, then PascalCase: iProvider, iCorrespondence |
| Class, enum | PascalCase: Sim |
aitem, titem and iprovider are still reported: the part after the prefix must be PascalCase.