myparcelnl / devtools
用于检查和分析 PHP 项目的开发工具。
1.0.0
2022-07-29 12:47 UTC
Requires
- php: >= 7
- phpmd/phpmd: >= 2.0
This package is auto-updated.
Last update: 2024-09-13 11:37:06 UTC
README
这些工具用于创建一致的 PHP 工作流程。
安装
composer require --dev myparcelnl/devtools
包含的工具
配置
PHPMD
在你的项目根目录下创建一个名为 phpmd.xml
的新文件。
将以下内容粘贴到其中
<?xml version="1.0"?> <ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="MyParcel" xmlns="http://pmd.sf.net/ruleset/1.0.0" xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 https://pmd.sourceforge.io/ruleset_xml_schema.xsd" xsi:noNamespaceSchemaLocation="https://pmd.sourceforge.io/ruleset_xml_schema.xsd"> <description /> <rule ref="vendor/myparcelnl/devtools/phpmd.xml"> <exclude name="StaticAccess" /> </rule> </ruleset>
然后设置你的 IDE,以启用 PHPMD 检查。