https://github.com/akalongman/php-code-style
PHP Code style configuration (PHPCS, etc)
https://github.com/akalongman/php-code-style
laravel phpcs sniffer
Last synced: 9 months ago
JSON representation
PHP Code style configuration (PHPCS, etc)
- Host: GitHub
- URL: https://github.com/akalongman/php-code-style
- Owner: akalongman
- License: mit
- Created: 2017-06-16T09:09:34.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-07-31T13:32:04.000Z (over 1 year ago)
- Last Synced: 2025-03-14T23:44:12.064Z (10 months ago)
- Topics: laravel, phpcs, sniffer
- Language: PHP
- Size: 125 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Longish code style configuration
================================
This is a [PSR-12](http://www.php-fig.org/psr/psr-12/) based code style ruleset for [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer)
PHP Code Sniffer
----------------
Configuration file: *longish.phpcs.xml*
### Usage
1. Link longman/php-code-style repo as composer dependency
`$ composer require --dev longman/php-code-style`
2. Extend provided configuration to adapt it to your project.
For example, create custom `phpcs.xml` file and put:
```xml
*/_stubs.php
*/_stubs.php
```
3. For Laravel you can directly include `laravel.phpcs.xml`:
```xml
```
Running check (Laravel example):
vendor/bin/phpcs --standard=vendor/longman/php-code-style/laravel.phpcs.xml -spn --encoding=utf-8 --report-width=150 --colors --parallel=16 app/ config/ tests/
Running check with custom phpcs.xml:
vendor/bin/phpcs --standard=phpcs.xml -spn --encoding=utf-8 --report-width=150 --colors --parallel=16 app/ config/ tests/