- Psalm plugin for autoregistration of installed
onepix/*-stubs - Rector CLI
composer require --dev onepix/wp-static-analysis- PHP 8.3+
vendor/bin/wp-static-analysis phpcs [OPTIONS] -- [<PHPCS-ARGS>...]vendor/bin/wp-static-analysis phpcbf [OPTIONS] -- [<PHPCS-ARGS>...][PHPCS-ARGS]: Arguments from PHP_CodeSniffer
[OPTIONS]:
--ruleset- Path to the customruleset.xmlfile relative to the project
If --ruleset is not present, it checks the files in order of priority:
.config/.phpcs.xml.config/phpcs.xml.config/.phpcs.xml.dist.config/phpcs.xml.distWpOnepixStandardis automatically applied
vendor/bin/wp-static-analysis phpcs --ruleset=./phpcs/example.xml -- --colors
.config/phpcs.xml
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Onepix WP Standard Override" namespace="WpOnepixStandardOverride" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<rule ref="WpOnepixStandard">
</rule>
<!-- Arguments -->
<arg name="extensions" value="php" />
<arg name="report" value="summary" />
<arg name="colors" />
<arg name="cache" />
<arg value="sp" />
</ruleset>vendor/bin/wp-static-analysis psalm [OPTIONS] -- [<PSALM-ARGS>...][PSALM-ARGS]: Arguments from Psalm
[OPTIONS]:
--config- Path to the custompsalm.xmlfile relative to the project
If --config is not present, it checks the files in order of priority:
.config/psalm.xml.config/psalm.xml.dist- Default config from this package
config/psalm.xml
vendor/bin/wp-static-analysis psalm --config=./phpcs/example.xml -- --help