jules-bertrand-external/php-quality-tools

该软件包最新版本(1.0.3)没有提供许可信息。

一套用于提高PHP代码质量的工具。

1.0.3 2023-01-27 13:07 UTC

This package is not auto-updated.

Last update: 2024-09-21 16:38:55 UTC


README

一套用于提高PHP代码质量的工具。

🛠️ 工具

🛠️ 安装

composer require jules-bertrand-external/php-quality-tools --dev

🧑🏻‍💻 使用方法

php vendor/bin/php-quality-tools run <paths> <-c> <t tool> <-r report path>

选项

paths : 定义要扫描的路径列表(目录或文件,使用逗号分隔的列表来列出多个路径)。默认情况下,将使用当前工作目录。

-c : 仅处理定义路径中的已更改文件。

-t <tool> : 要执行的工具,"phpcs"、"php-cs-fixer"、"phpmd"、"phpstan"之一。如果您只想执行特定工具。

-r <report path> : 将在指定路径生成checkstyle格式的报告。

🧐 注意事项

如果您想加快PHPMD工具的速度,您可以在项目目录的根目录下创建名为pdepend.xml的文件,并包含以下内容

<?xml version="1.0"?>
<symfony:container xmlns:symfony="https://symfony.com.cn/schema/dic/services"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns="http://pdepend.org/schema/dic/pdepend"
                   xsi:schemaLocation="https://symfony.com.cn/schema/dic/services https://symfony.com.cn/schema/dic/services/services-1.0.xsd">
    <config>
        <cache>
            <driver>memory</driver>
        </cache>
    </config>
</symfony:container>