arty/php-coding-standard 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

arty/php-coding-standard

最新稳定版本:v3.0.0

Composer 安装命令:

composer require arty/php-coding-standard

包简介

Static analysis tools config for PHP projects, by arty.

README 文档

README

This is the coding style tools config I use everyday on my projects.

it includes :

  • PHPCS for code sniffing.
  • PHPStan for static bug finding into code.
  • PHPAt as phpstan extension for architecture validation

Installation

Installation with composer :

composer require arty/php-coding-standard --dev

Usage

PHPCS

In your project, create a phpcs.xml file and fill it up with :

<?xml version="1.0"?>
<ruleset name="Arty Coding Standard" 
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:noNamespaceSchemaLocation="../../vendor/squizlabs/php_codesniffer/phpcs.xsd">
    <rule ref="./vendor/arty/php-coding-standard/lib/phpcs/phpcs.xml" />
</ruleset>

Run it with :

$ ./vendor/bin/phpcs src

PHPStan

In your project, create a phpstan.neon file and fill it up with :

includes:
    - vendor/arty/php-coding-standard/lib/phpstan/phpstan.neon

Run it with :

$ ./vendor/bin/phpstan analyse --level=max src

PHPAT

Validate Architecture.

A minimal Clean Architecture validation is provided, activate it by adding this to your phpstan.neon:

services:
    -
        class: ArtyCodingStandard\PHPAt\CleanArchitectureTest
        tags:
            - phpat.test

统计信息

  • 总下载量: 283
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 4
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固