kortdev/kortdev-phpcs

PHPCS libraries and configuration for Laravel

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

Type:phpcodesniffer-standard

1.0.3 2020-05-23 14:10 UTC

This package is auto-updated.

Last update: 2024-03-27 16:38:21 UTC


README

Use this package to set up a consistent PHPCS configuration across Laravel projects.

If you wish to use this configuration in your project, install it using composer: Download the ruleset.xml, rename it to phpcs.xml and place it in your root.

If you wish to use this configuration in global envirioment, install it globally using composer: composer global require --dev kortdev/laravel-phpcs

And set it to default standard: phpcs --config-set default_standard kortdev-phpcs

--

Afterwards, you may run php vendor/bin/phpcs -i and see kortdev-phpcs listed as an installed ruleset.

You may now use the ruleset like so: For one file: phpcs --standard=kortdev-phpcs my_file.php For the whole directory: phpcd . --standard=kortdev-phpcs

Additional arguments: -e - List rules & standards -n - Hide warnings -l - Local directory online --report=code - Report foreach codeline --report=gitblame - Report for gitblame --report=source - Report for source

Note, If you're installing globally with Composer you can simply do phpcs -i.