-
Notifications
You must be signed in to change notification settings - Fork 22
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
ea5639c
commit 5c565ec
Showing
12 changed files
with
134 additions
and
30 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,36 @@ | ||
<?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> | ||
<file>tests</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,50 @@ | ||
parameters: | ||
|
||
paths: | ||
- src | ||
- tests | ||
|
||
# The level 9 is the highest level | ||
level: 5 | ||
|
||
ignoreErrors: | ||
- '#has an uninitialized readonly property#' | ||
- '#Binary operation \"\+\" between string#' | ||
- '#Call to an undefined method AnourValar\\Office\\Drivers\\SaveInterface\:\:getSheetCount\(\)#' | ||
- '#Call to an undefined method AnourValar\\Office\\Drivers\\SaveInterface\:\:replace\(\)#' | ||
- '#unknown class PhpOffice#' | ||
- '#Unsafe usage of new static#' | ||
- '#Call to an undefined method AnourValar\\Office\\Drivers\\SaveInterface\:\:setGrid\(\)#' | ||
- '#Parameter \#1 \$driver of method AnourValar\\Office\\GridService\:\:getGenerator\(\) expects AnourValar\\Office\\Drivers\\GridInterface#' | ||
- '#Class AnourValar\\Office\\Tests\\SheetsParserTest has an uninitialized property \$service#' | ||
- '#has an uninitialized property \$fileSystem#' | ||
- '#\(\) on iterable\.#' | ||
- '#Instantiated class ZipStream#' | ||
- '#unknown class ZipStream#' | ||
- '#has an uninitialized property \$sourceActiveSheetIndex#' | ||
- '#\$format is assigned outside of the constructor#' | ||
- '#has invalid return type PhpOffice#' | ||
- '#\$spreadsheet is assigned outside of the constructor#' | ||
- '#Binary operation \"\-\" between string and string results in an error#' | ||
- '#Instantiated class PhpOffice#' | ||
- '#expects string, int given#' | ||
- '#expects int, string given#' | ||
- '#has invalid type PhpOffice#' | ||
- '#Match expression does not handle remaining value: mixed#' | ||
- '#Access to an undefined property AnourValar\\Office\\Drivers\\MixInterface\:\:\$spreadsheet#' | ||
- '#Call to an undefined method AnourValar\\Office\\Drivers\\MixInterface\:\:sheet\(\)#' | ||
|
||
|
||
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
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