Skip to content

Commit

Permalink
Update squizlabs/php_codesniffer and use PSR-12
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelHartmann authored Oct 5, 2020
2 parents 2db2ce1 + 05a6feb commit ec5f359
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@


This repository contains the ruleset for the PHP code we develop at [FLYERALARM](https://flyeralarm.com).
It mostly consists of PSR-2 with some custom additions. The rules are enforced with the help of squizlabs/PHP_CodeSniffer
It mostly consists of PSR-12 with some custom additions. The rules are enforced with the help of squizlabs/PHP_CodeSniffer

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,
“SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be
interpreted as described in [RFC 2119](http://www.ietf.org/rfc/rfc2119.txt).

## Custom Rules in addition to PSR-2
## Custom Rules in addition to PSR-12

* Variable names MUST be in lowerCamelCase
* Yoda conditions MUST NOT be used
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"minimum-stability": "stable",
"require": {
"squizlabs/php_codesniffer": "^3.0"
"squizlabs/php_codesniffer": "^3.5"
},
"bin": [
"bin/php-code-validator"
Expand Down
16 changes: 8 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ruleset.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<ruleset name="FLYERALARM Coding Guidelines">
<description>A custom coding standard for FLYERALARM</description>
<rule ref="PSR2"/>
<rule ref="PSR12"/>
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
Expand Down

0 comments on commit ec5f359

Please sign in to comment.