frankverhoeven/coding-standard

FV 编码规范

安装数: 4,225

依赖: 1

推荐者: 0

安全性: 0

星标: 0

关注者: 2

分支: 0

公开问题: 0

类型:phpcodesniffer-standard

2.3 2024-07-03 06:09 UTC

This package is auto-updated.

Last update: 2024-09-03 06:53:23 UTC


README

一组基于 Doctrine 编码规范,并大量借鉴的 PHP_CodeSniffer 规则。

安装

使用 composer 安装此包

composer require frankverhoeven/coding-standard --dev

配置

将规则集添加到您的 phpcs.xml.dist 文件中

<?xml version="1.0" encoding="UTF-8"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"
>
    <arg name="basepath" value="."/>
    <arg name="cache" value=".phpcs-cache"/>
    <arg name="colors"/>
    <arg name="extensions" value="php"/>
    <arg name="parallel" value="80"/>
    <arg value="sp"/>

    <file>src</file>
    <file>tests</file>

    <rule ref="FrankVerhoeven"/>
</ruleset>