struggle-for-php / sfp-coding-standard
PHP_CodeSniffer sniffs
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:phpcodesniffer-standard
Requires
- php: >=7.2.0
- slevomat/coding-standard: ^5.0
- squizlabs/php_codesniffer: ^3.5
- symplify/coding-standard: ^6.1
Requires (Dev)
- infection/infection: ^0.14.1
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^0.11.16
- phpstan/phpstan-deprecation-rules: ^0.11.2
- phpstan/phpstan-strict-rules: ^0.11.1
- phpunit/phpunit: ^8.3
- vimeo/psalm: ^3.6
This package is auto-updated.
Last update: 2024-12-13 12:53:03 UTC
README
ForbiddenInstantiationSniff
setup in your phpcs.xml
eg.
<config name="installed_paths" value="../../slevomat/coding-standard,../../struggle-for-php/sfp-coding-standard"/>
<rule ref="SfpCodingStandard.Di.ForbiddenInstantiation">
<properties>
<property name="forbiddenInstantiations" type="array">
<element key="App\\PdoFactory" value="PDO"/>
</property>
</properties>
</rule>