-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
479ad35
commit f2d7766
Showing
9 changed files
with
98 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->exclude('vendor') | ||
->in(__DIR__); | ||
|
||
$config = new PhpCsFixer\Config(); | ||
return $config->setRules([ | ||
'@PSR12' => true, | ||
]) | ||
->setFinder($finder); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0"?> | ||
<!-- @see https://pear.php.net/manual/en/package.php.php-codesniffer.annotated-ruleset.php --> | ||
<ruleset name="PHPCS Rules"> | ||
|
||
<description>PHPCS ruleset</description> | ||
|
||
<file>src</file> | ||
|
||
<!-- Show progress of the run --> | ||
<arg value= "p"/> | ||
|
||
<!-- Show sniff codes in all reports --> | ||
<arg value= "s"/> | ||
|
||
<!-- Our base rule: set to PSR12 --> | ||
<rule ref="PSR12"> | ||
<exclude name="PSR12.Operators.OperatorSpacing.NoSpaceBefore"/> | ||
<exclude name="PSR12.Operators.OperatorSpacing.NoSpaceAfter"/> | ||
<exclude name="PSR12.Traits.UseDeclaration.MultipleImport"/> | ||
<exclude name="Generic.Files.LineLength.TooLong"/> | ||
<exclude name="PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose"/> | ||
<exclude name="PSR12.Classes.OpeningBraceSpace.Found"/> | ||
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpen"/> | ||
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose"/> | ||
</rule> | ||
|
||
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps"> | ||
<exclude-pattern>tests/</exclude-pattern> | ||
</rule> | ||
|
||
<rule ref="Internal.NoCodeFound"> | ||
<exclude-pattern>tests/</exclude-pattern> | ||
</rule> | ||
|
||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
parameters: | ||
|
||
paths: | ||
- src | ||
|
||
# The level 9 is the highest level | ||
level: 5 | ||
|
||
ignoreErrors: | ||
- '#Unsafe usage of new static\(\)#' | ||
- '#Right side of \&\& is always false#' | ||
- '#Call to static method#' | ||
- '#Call to an undefined method#' | ||
|
||
excludePaths: | ||
|
||
checkFunctionNameCase: true | ||
checkInternalClassCaseSensitivity: true | ||
checkAlwaysTrueInstanceof: true | ||
reportMaybesInMethodSignatures: true | ||
reportStaticMethodSignatures: true | ||
checkUninitializedProperties: true | ||
checkDynamicProperties: true | ||
reportAlwaysTrueInLastCondition: true | ||
reportWrongPhpDocTypeInVarTag: true | ||
checkMissingCallableSignature: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters