struggle-for-php/sfp-coding-standard-sniffs-di

此包已被 废弃 且不再维护。作者建议使用 struggle-for-php/sfp-coding-standard 包。

PHP_CodeSniffer sniffs

安装: 7

依赖: 0

建议者: 0

安全: 0

星星: 0

关注者: 1

分支: 0

开放问题: 0

类型:phpcodesniffer-standard

0.1.1 2019-11-13 02:29 UTC

This package is auto-updated.

Last update: 2019-11-13 02:32:14 UTC


README

ForbiddenInstantiationSniff

在您的 phpcs.xml 中设置

例如。

    <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>

待办事项