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

0.1.1 2019-11-13 02:29 UTC

This package is auto-updated.

Last update: 2024-11-13 12:39:26 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>

Todos