An open API service indexing awesome lists of open source software.

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)

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/