[Slim] Add PHP CodeSniffer to check coding style (#897)

* [Slim] Add PHP CodeSniffer package

* [Slim] Add phpcsStandard generator option

We follow PSR-2 coding style guide in PHP generators. It might be convenient
for users to specify own coding standard without modifying templates. That's
why I've added this option.

At first, I thought to add option validation and accept only standards from
predefined list. But this option also can be a full path to the standard's
root directory, I've changed my mind. User should use this option with caution.

Ref to all PHP CodeSniffer CLI options:
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage

* [Slim] Extend readme with PHP CodeSniffer docs

* [Slim] Format templates to meet PSR-2

* [Slim] Refresh samples
This commit is contained in:
Yuriy Belenko
2018-08-26 15:26:09 +05:00
committed by GitHub
parent 4401407c7c
commit 15cec0ae09
107 changed files with 1231 additions and 1084 deletions

View File

@@ -7,15 +7,15 @@ namespace OpenAPIServer\Model;
/**
* ArrayTest
*/
class ArrayTest {
class ArrayTest
{
/** @var string[] $arrayOfString */
private $arrayOfString;
/** @var int[][] $arrayArrayOfInteger */
private $arrayArrayOfInteger;
/** @var \OpenAPIServer\Model\ReadOnlyFirst[][] $arrayArrayOfModel */
private $arrayArrayOfModel;
}