-
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.
Merge pull request #6 from Ilyes512/version-2
Version-2
- Loading branch information
Showing
9 changed files
with
262 additions
and
446 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
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 |
---|---|---|
|
@@ -7,3 +7,5 @@ | |
/.phplint.cache | ||
/auth.json | ||
Taskfile.yml | ||
docs.html | ||
/temp |
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,198 @@ | ||
<?xml version="1.0"?> | ||
<ruleset | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
name="Ilyes512CodingStandard" | ||
xsi:noNamespaceSchemaLocation="../vendor/squizlabs/php_codesniffer/phpcs.xsd" | ||
> | ||
<description>ilyes512/code-style ruleset</description> | ||
|
||
<arg value="s"/><!-- Show sniff codes in all reports --> | ||
<arg value="p"/><!-- Show progress of the run --> | ||
<arg name="colors"/><!-- Use colors in output --> | ||
<arg name="extensions" value="php"/> | ||
|
||
<!-- PSR1 START --> | ||
<rule ref="Generic.PHP.DisallowAlternativePHPTags"/> | ||
<rule ref="Generic.PHP.DisallowShortOpenTag"/> | ||
<rule ref="Generic.PHP.DisallowShortOpenTag.EchoFound"> | ||
<severity>0</severity> | ||
</rule> | ||
<rule ref="Generic.Files.ByteOrderMark"/> | ||
<rule ref="Squiz.Classes.ValidClassName"/> | ||
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/> | ||
<!-- PSR1 END --> | ||
|
||
<!-- PSR1-EXTRA START --> | ||
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols"/> | ||
<rule ref="PSR1.Classes.ClassDeclaration"/> | ||
<rule ref="PSR1.Methods.CamelCapsMethodName"/> | ||
<!-- PSR1-EXTRA END --> | ||
|
||
<!-- PSR12 START --> | ||
<rule ref="Generic.Files.LineEndings"> | ||
<properties> | ||
<property name="eolChar" value="\n"/> | ||
</properties> | ||
</rule> | ||
<rule ref="PSR2.Files.EndFileNewline"/> | ||
<rule ref="PSR2.Files.ClosingTag"/> | ||
<rule ref="Generic.Files.LineLength"> | ||
<properties> | ||
<property name="lineLimit" value="120"/> | ||
<property name="absoluteLineLimit" value="0"/> | ||
</properties> | ||
</rule> | ||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/> | ||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile"> | ||
<severity>0</severity> | ||
</rule> | ||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile"> | ||
<severity>0</severity> | ||
</rule> | ||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines"> | ||
<severity>0</severity> | ||
</rule> | ||
<rule ref="Generic.Formatting.DisallowMultipleStatements"/> | ||
<rule ref="Generic.WhiteSpace.ScopeIndent"> | ||
<properties> | ||
<property name="ignoreIndentationTokens" type="array"> | ||
<element value="T_COMMENT"/> | ||
<element value="T_DOC_COMMENT_OPEN_TAG"/> | ||
</property> | ||
</properties> | ||
</rule> | ||
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/> | ||
<rule ref="Generic.PHP.LowerCaseKeyword"/> | ||
<rule ref="Generic.PHP.LowerCaseConstant"/> | ||
<rule ref="Generic.PHP.LowerCaseType"/> | ||
<rule ref="PSR2.Classes.ClassDeclaration"/> | ||
<rule ref="PSR2.Classes.PropertyDeclaration"/> | ||
<rule ref="Squiz.Scope.MethodScope"/> | ||
<rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/> | ||
<rule ref="PSR2.Methods.MethodDeclaration"/> | ||
<rule ref="PSR2.Methods.MethodDeclaration.Underscore"> | ||
<type>error</type> | ||
<message>Method name "%s" must not be prefixed with an underscore to indicate visibility</message> | ||
</rule> | ||
<rule ref="PSR2.Methods.FunctionClosingBrace"/> | ||
<rule ref="Squiz.Functions.FunctionDeclaration"/> | ||
<rule ref="Squiz.Functions.LowercaseFunctionKeywords"/> | ||
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing"> | ||
<properties> | ||
<property name="equalsSpacing" value="1"/> | ||
</properties> | ||
</rule> | ||
<rule ref="PEAR.Functions.ValidDefaultValue"/> | ||
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration"/> | ||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing"/> | ||
<rule ref="PSR2.Methods.FunctionCallSignature"/> | ||
<rule ref="PSR2.Methods.FunctionCallSignature.SpaceAfterCloseBracket"> | ||
<severity>0</severity> | ||
</rule> | ||
<rule ref="PSR2.Methods.FunctionCallSignature.OpeningIndent"> | ||
<severity>0</severity> | ||
</rule> | ||
<rule ref="Squiz.ControlStructures.ControlSignature"/> | ||
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpen"/> | ||
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose"/> | ||
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace"/> | ||
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration"/> | ||
<rule ref="Squiz.ControlStructures.ForLoopDeclaration"> | ||
<properties> | ||
<property name="ignoreNewlines" value="true"/> | ||
</properties> | ||
</rule> | ||
<rule ref="Squiz.ControlStructures.ForLoopDeclaration.SpacingAfterOpen"> | ||
<severity>0</severity> | ||
</rule> | ||
<rule ref="Squiz.ControlStructures.ForLoopDeclaration.SpacingBeforeClose"> | ||
<severity>0</severity> | ||
</rule> | ||
<rule ref="Squiz.ControlStructures.LowercaseDeclaration"/> | ||
<rule ref="Generic.ControlStructures.InlineControlStructure"/> | ||
<!-- exclude this message as it is already checked in Generic.PHP.LowerCaseKeyword --> | ||
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.AsNotLower"> | ||
<severity>0</severity> | ||
</rule> | ||
<rule ref="PSR2.ControlStructures.ElseIfDeclaration"/> | ||
<rule ref="PSR2.ControlStructures.SwitchDeclaration"/> | ||
<!-- exclude these messages as they are already checked by PSR2.ControlStructures.ControlStructureSpacing --> | ||
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.SpaceAfterOpen"> | ||
<severity>0</severity> | ||
</rule> | ||
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.SpaceBeforeClose"> | ||
<severity>0</severity> | ||
</rule> | ||
<rule ref="Generic.WhiteSpace.IncrementDecrementSpacing"/> | ||
<rule ref="Squiz.WhiteSpace.CastSpacing"/> | ||
<!-- PSR12 END --> | ||
|
||
<!-- PSR12-EXTRA START --> | ||
<rule ref="PSR12.Keywords.ShortFormTypeKeywords"/> | ||
<rule ref="PSR12.Files.ImportStatement"/> | ||
<rule ref="PSR12.Files.DeclareStatement"/> | ||
<rule ref="PSR12.Classes.ClosingBrace"/> | ||
<rule ref="PSR12.Classes.OpeningBraceSpace"/> | ||
<rule ref="PSR12.Traits.UseDeclaration"/> | ||
<rule ref="PSR12.Properties.ConstantVisibility"/> | ||
<rule ref="PSR12.Functions.ReturnTypeDeclaration"/> | ||
<rule ref="PSR12.Functions.NullableTypeDeclaration"/> | ||
<rule ref="PSR12.ControlStructures.ControlStructureSpacing"/> | ||
<rule ref="PSR12.ControlStructures.BooleanOperatorPlacement"/> | ||
<rule ref="Squiz.ControlStructures.ControlSignature"/> | ||
<rule ref="PSR12.Operators.OperatorSpacing"/> | ||
<rule ref="PSR12.Functions.ReturnTypeDeclaration"/> | ||
<rule ref="PSR12.Classes.AnonClassDeclaration"/> | ||
<!-- PSR12-EXTRA END --> | ||
|
||
<!-- CUSTOM STRING RULES START --> | ||
<rule ref="Squiz.Strings.DoubleQuoteUsage.NotRequired"/> | ||
<!-- CUSTOM STRING RULES END --> | ||
|
||
<!-- CUSTOM TRAILING COMMA RULES START --> | ||
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/> | ||
<rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInCall"/> | ||
<rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInClosureUse"/> | ||
<rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration"/> | ||
<!-- CUSTOM TRAILING COMMA RULES END --> | ||
|
||
<!-- CUSTOM NAMESPACES RULES START --> | ||
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"> | ||
<properties> | ||
<property name="caseSensitive" value="true"/> | ||
</properties> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse"/> | ||
<rule ref="SlevomatCodingStandard.Namespaces.NamespaceDeclaration"/> | ||
<rule ref="SlevomatCodingStandard.Namespaces.NamespaceSpacing"/> | ||
<rule ref="SlevomatCodingStandard.Namespaces.RequireOneNamespaceInFile"/> | ||
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly"> | ||
<properties> | ||
<property name="searchAnnotations" value="true"/> | ||
<!-- <property name="allowFallbackGlobalFunctions" value="false"/> --> | ||
<!-- <property name="allowFallbackGlobalConstants" value="false"/> --> | ||
<property name="allowPartialUses" value="false"/> | ||
</properties> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/> | ||
<rule ref="SlevomatCodingStandard.Namespaces.UseSpacing"> | ||
<properties> | ||
<property name="linesCountBetweenUseTypes" value="1"/> | ||
</properties> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.Namespaces.UselessAlias"/> | ||
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses"> | ||
<properties> | ||
<property name="searchAnnotations" value="true"/> | ||
</properties> | ||
</rule> | ||
<!-- CUSTOM NAMESPACES RULES END --> | ||
|
||
<!-- CUSTOM TYPE HINTS RULES START --> | ||
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"> | ||
<properties> | ||
<property name="spacesCountAroundEqualsSign" value="0"/> | ||
</properties> | ||
</rule> | ||
<!-- CUSTOM TYPE HINTS RULES START --> | ||
</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
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.