Registry / build-tool / squizlabs-php-codesniffer

squizlabs-php-codesniffer

JSON →
library4.0.1phppackagistunverified

PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.

composer require squizlabs/php_codesniffer
INSTALL
IMPORT
SIG · SQUIZLABS-PHP-CODE
S
squizlabs-php-codesniffer
build-toolphpv4.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Runner
use PHP_CodeSniffer\Runner;

Running PHP_CodeSniffer programmatically

use PHP_CodeSniffer\Runner; $runner = new Runner(); $runner->config->standards = ['PSR12']; $runner->config->files = ['path/to/file.php']; $runner->init(); $runner->run();
Debug
Known issues
breakingPHP_CodeSniffer 4.0 changed the namespace from PHP_CodeSniffer to PHP_CodeSniffer\Runner
fix
Update use statements and class references when upgrading from 3.x
affects: >=4.0.0
Upgrade
Version history
4.0.1latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
20
OpenAI (training)
1
Resources
squizlabs-php-codesniffer — pip install squizlabs-php-codesniffer · libregistry