From a5b9c89871531b9338b9cb5328f6ef9a085f2514 Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Sat, 30 Dec 2023 15:04:20 +0000 Subject: [PATCH 01/16] Removed ecs dependency and use PHP_CodeSniffer direcly --- .gitattributes | 1 - composer.json | 35 ++--- ecs-local.php | 17 --- ecs.php | 375 ------------------------------------------------- ruleset.xml | 14 ++ 5 files changed, 22 insertions(+), 420 deletions(-) delete mode 100644 ecs-local.php delete mode 100644 ecs.php create mode 100644 ruleset.xml diff --git a/.gitattributes b/.gitattributes index 6b61ce3..2f5fd7d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -12,7 +12,6 @@ /.gitignore export-ignore /.vsls.json export-ignore /auth.json export-ignore -/ecs-local.php export-ignore /phpstan.neon export-igore /phpstan.dist.neon export-ignore /Taskfile.dist.yml export-ignore diff --git a/composer.json b/composer.json index 6e55065..66f4569 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,19 @@ { "name": "ilyes512/code-style", - "type": "library", - "description": "An ECS (Easy Coding Standards) codestyle package.", + "type": "phpcodesniffer-standard", + "description": "An PHP_CodeSniffer codestyle package.", "keywords": [ - "package", - "easy coding standard", - "code style", - "ecs" + "phpcs", + "dev", + "code-style", + "codestyle" ], "license": "MIT", "require": { "php": "^7.4 || ^8.0", + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0", "slevomat/coding-standard": "^8.0", - "symplify/easy-coding-standard": "^11.0" - }, - "require-dev": { - "overtrue/phplint": "^9.0.4" - }, - "scripts": { - "lint": "XDEBUG_MODE=off phplint --exclude=vendor .", - "checkstyle": "XDEBUG_MODE=off ecs check --config=ecs-local.php", - "fixstyle": "@checkstyle --fix", - "checkall": [ - "@lint", - "@checkstyle", - "composer outdated --direct", - "composer outdated --direct --minor-only --strict" - ] - }, - "scripts-descriptions": { - "lint": "Check all php files for syntax errors.", - "checkstyle": "Report on code style violations (without fixing it).", - "fixstyle": "Fixes code style violations.", - "checkall": "Run all code checkers (lint, checkstyle, outdated, ...)." + "squizlabs/php_codesniffer": "^3.0" }, "extra": { "branch-alias": { diff --git a/ecs-local.php b/ecs-local.php deleted file mode 100644 index 7d5b4bf..0000000 --- a/ecs-local.php +++ /dev/null @@ -1,17 +0,0 @@ -import(__DIR__ . '/ecs.php'); - - $containerConfigurator - ->parameters() - ->set(Option::PATHS, [ - __DIR__ . '/ecs-local.php', - __DIR__ . '/ecs.php', - ]); -}; diff --git a/ecs.php b/ecs.php deleted file mode 100644 index 5d1866b..0000000 --- a/ecs.php +++ /dev/null @@ -1,375 +0,0 @@ -services(); - - $maxLineLength = 120; - - // PSR-12 - $services->set(EncodingFixer::class); - $services->set(FullOpeningTagFixer::class); - $services->set(BlankLineAfterNamespaceFixer::class); - $services->set(ClassDefinitionFixer::class); - $services->set(ConstantCaseFixer::class); - $services->set(ElseifFixer::class); - $services->set(FunctionDeclarationFixer::class); - $services->set(IndentationTypeFixer::class); - $services->set(LineEndingFixer::class); - $services->set(LowercaseKeywordsFixer::class); - $services->set(MethodArgumentSpaceFixer::class) - ->call('configure', [ - ['on_multiline' => 'ensure_fully_multiline'], - ]); - $services->set(NoBreakCommentFixer::class); - $services->set(NoClosingTagFixer::class); - $services->set(NoSpacesAfterFunctionNameFixer::class); - $services->set(NoSpacesInsideParenthesisFixer::class); - $services->set(NoTrailingWhitespaceFixer::class); - $services->set(NoTrailingWhitespaceInCommentFixer::class); - $services->set(SingleBlankLineAtEofFixer::class); - $services->set(SingleLineAfterImportsFixer::class); - $services->set(SwitchCaseSemicolonToColonFixer::class); - $services->set(SwitchCaseSpaceFixer::class); - $services->set(LowercaseCastFixer::class); - $services->set(ShortScalarCastFixer::class); - $services->set(BlankLineAfterOpeningTagFixer::class); - $services->set(NoLeadingImportSlashFixer::class); - $services->set(OrderedImportsFixer::class) - ->call('configure', [ - [ - 'imports_order' => [ - 'class', - 'function', - 'const', - ], - ], - ]); - $services->set(DeclareEqualNormalizeFixer::class) - ->call('configure', [ - ['space' => 'none'], - ]); - $services->set(NewWithBracesFixer::class); - $services->set(BracesFixer::class) - ->call('configure', [ - [ - 'allow_single_line_closure' => false, - 'position_after_functions_and_oop_constructs' => 'next', - 'position_after_control_structures' => 'same', - 'position_after_anonymous_constructs' => 'same', - ], - ]); - $services->set(NoBlankLinesAfterClassOpeningFixer::class); - $services->set(VisibilityRequiredFixer::class) - ->call('configure', [ - [ - 'elements' => [ - 'const', - 'method', - 'property', - ], - ], - ]); - $services->set(BinaryOperatorSpacesFixer::class); - $services->set(TernaryOperatorSpacesFixer::class); - $services->set(UnaryOperatorSpacesFixer::class); - $services->set(ReturnTypeDeclarationFixer::class); - $services->set(ConcatSpaceFixer::class) - ->call('configure', [ - [ - 'spacing' => 'one', - ], - ]); - $services->set(NoSinglelineWhitespaceBeforeSemicolonsFixer::class); - $services->set(NoWhitespaceBeforeCommaInArrayFixer::class); - $services->set(WhitespaceAfterCommaInArrayFixer::class); - - // Custom PHP_CodeSniffer - $services->set(FileHeaderSniff::class); - $services->set(DisallowLongArraySyntaxSniff::class); - $services->set(ArrayIndentSniff::class); - $services->set(CastSpacingSniff::class); - $services->set(SpaceAfterCastSniff::class); - $services->set(LineLengthSniff::class) - ->property('absoluteLineLimit', $maxLineLength); - $services->set(FunctionSpacingSniff::class) - ->property('spacing', 1) - ->property('spacingBeforeFirst', 0) - ->property('spacingAfterLast', 0); - - // Custom PhpCsFixer - $services->set(DeclareStrictTypesFixer::class); - - // Custom Slevomat - $services->set(UselessConstantTypeHintSniff::class); - $services->set(UnionTypeHintFormatSniff::class) - ->property('withSpaces', 'no') - ->property('shortNullable', 'yes') - ->property('nullPosition', 'last'); - $services->set(RequireNonCapturingCatchSniff::class); - $services->set(ClassStructureSniff::class) - ->property('groups', [ - 'uses', - - 'enum cases', - - 'public constants', - 'protected constants', - 'private constants', - - 'public static properties', - 'protected static properties', - 'private static properties', - - 'public properties', - 'protected properties', - 'private properties', - - 'constructor', - 'static constructors', - 'destructor', - - 'public final methods', - 'public static final methods', - 'public abstract methods', - 'public static abstract methods', - 'public static methods', - 'public methods', - - 'protected final methods', - 'protected static final methods', - 'protected abstract methods', - 'protected static abstract methods', - 'protected static methods', - 'protected methods', - - 'private static methods', - 'private methods', - - 'magic methods', - ]); - $services->set(RequireConstructorPropertyPromotionSniff::class); - $services->set(UselessLateStaticBindingSniff::class); - $services->set(DisallowContinueWithoutIntegerOperandInSwitchSniff::class); - $services->set(StaticClosureSniff::class); - - // Custom Slevomat Cleaning (Dead Code detection) - $services->set(UnusedInheritedVariablePassedToClosureSniff::class); - $services->set(UselessParameterDefaultValueSniff::class); - $services->set(ReferenceUsedNamesOnlySniff::class) - ->property('searchAnnotations', true); - $services->set(UnusedUsesSniff::class) - ->property('searchAnnotations', true); - $services->set(UseFromSameNamespaceSniff::class); - $services->set(UselessAliasSniff::class); - $services->set(OptimizedFunctionsWithoutUnpackingSniff::class); - $services->set(UselessSemicolonSniff::class); - $services->set(DisallowSuperGlobalVariableSniff::class); - $services->set(UnusedVariableSniff::class) - ->property('ignoreUnusedValuesWhenOnlyKeysAreUsedInForeach', true); - $services->set(UselessVariableSniff::class); - $services->set(DeadCatchSniff::class); - - // Custom Slevomat Formatting - $services->set(MultiLineArrayEndBracketPlacementSniff::class); - $services->set(SingleLineArrayWhitespaceSniff::class); - $services->set(TrailingArrayCommaSniff::class); - $services->set(ClassMemberSpacingSniff::class); - $services->set(ConstantSpacingSniff::class) - ->property('minLinesCountBeforeWithComment', 1) - ->property('maxLinesCountBeforeWithComment', 1) - ->property('minLinesCountBeforeWithoutComment', 0) - ->property('maxLinesCountBeforeWithoutComment', 1); - $services->set(ModernClassNameReferenceSniff::class); - $services->set(ParentCallSpacingSniff::class); - $services->set(PropertySpacingSniff::class) - ->property('minLinesCountBeforeWithComment', 1) - ->property('maxLinesCountBeforeWithComment', 1) - ->property('minLinesCountBeforeWithoutComment', 0) - ->property('maxLinesCountBeforeWithoutComment', 1); - $services->set(RequireMultiLineMethodSignatureSniff::class) - ->property('minLineLength', $maxLineLength); - $services->set(TraitUseDeclarationSniff::class); - $services->set(JumpStatementsSpacingSniff::class); - $services->set(LanguageConstructWithParenthesesSniff::class); - $services->set(ArrowFunctionDeclarationSniff::class) - ->property('allowMultiLine', true); - $services->set(RequireTrailingCommaInCallSniff::class); - $services->set(RequireTrailingCommaInDeclarationSniff::class); - $services->set(NamespaceDeclarationSniff::class); - $services->set(NamespaceSpacingSniff::class); - $services->set(UseSpacingSniff::class); - $services->set(RequireNumericLiteralSeparatorSniff::class) - ->property('minDigitsBeforeDecimalPoint', 6); - $services->set(ShortListSniff::class); - $services->set(ClassConstantVisibilitySniff::class); - $services->set(NullableTypeForNullDefaultValueSniff::class); - $services->set(DisallowGroupUseSniff::class); - $services->set(PropertyDeclarationSniff::class); - - // New funtional slevomat rules - $services->set(ParameterTypeHintSniff::class); - $services->set(PropertyTypeHintSniff::class); - $services->set(ReturnTypeHintSniff::class); - $services->set(RequireNonCapturingCatchSniff::class); - $services->set(DisallowImplicitArrayCreationSniff::class); - $services->set(RequireNullCoalesceOperatorSniff::class); - $services->set(RequireNullCoalesceEqualOperatorSniff::class); - $services->set(EarlyExitSniff::class); - $services->set(StrictCallSniff::class); - $services->set(DisallowDirectMagicInvokeCallSniff::class); - $services->set(DisallowEqualOperatorsSniff::class); - - // New clean slevomat rules - $services->set(UnusedParameterSniff::class); - $services->set(UselessParenthesesSniff::class); - $services->set(DuplicateAssignmentToVariableSniff::class); - - // New formatting slevomat rules https://github.com/slevomat/coding-standard#formatting---rules-for-consistent-code-looks - $services->set(RequireNullSafeObjectOperatorSniff::class); - $services->set(RequireShortTernaryOperatorSniff::class); - $services->set(RequireArrowFunctionSniff::class); - $services->set(DisallowArrayTypeHintSyntaxSniff::class); - $services->set(LongTypeHintsSniff::class); - $services->set(NullTypeHintOnLastPositionSniff::class); - $services->set(TypeCastSniff::class); - $services->set(ParameterTypeHintSpacingSniff::class); - // $services->set(FullyQualifiedGlobalConstantsSniff::class); - // $services->set(FullyQualifiedGlobalFunctionsSniff::class); - $services->set(MultipleUsesPerLineSniff::class); - $services->set(ForbiddenAnnotationsSniff::class) - ->property('forbiddenAnnotations', ['@author', '@created', '@version', '@package', '@copyright']); - $services->set(DocCommentSpacingSniff::class) - ->property('annotationsGroups', [ - '@var', - '@param', - '@return', - ]); - $services->set(InlineDocCommentDeclarationSniff::class) - ->property('allowDocCommentAboveReturn', true) - ->property('allowAboveNonAssignment', true); - - $containerConfigurator - ->parameters() - ->set(Option::PARALLEL, true); -}; diff --git a/ruleset.xml b/ruleset.xml new file mode 100644 index 0000000..489c0c3 --- /dev/null +++ b/ruleset.xml @@ -0,0 +1,14 @@ + + + ilyes512/code-style ruleset + + + + + + + From a01dd2e029d518f143b4baee8c9c4be95f3c4598 Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Sat, 30 Dec 2023 15:09:11 +0000 Subject: [PATCH 02/16] Temp add dev-version-2 as 2.0.* alias --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 66f4569..05bdf23 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,8 @@ }, "extra": { "branch-alias": { - "dev-main": "1.0-dev" + "dev-main": "1.0-dev", + "dev-version-2": "2.0-dev" } }, "minimum-stability": "dev", From d1b360af202c7e29d774253f4889e9dac2a48ba0 Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Sat, 30 Dec 2023 15:18:08 +0000 Subject: [PATCH 03/16] Remove spaces from ruleset name --- ruleset.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruleset.xml b/ruleset.xml index 489c0c3..cb2de08 100644 --- a/ruleset.xml +++ b/ruleset.xml @@ -1,7 +1,7 @@ ilyes512/code-style ruleset From bc7c7a1b86a919ccb9e6a0dd74deebbf91b511ce Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Sat, 30 Dec 2023 15:28:16 +0000 Subject: [PATCH 04/16] Move ruleset to subdirectory so it will use that dir as the name for the ruleset --- ruleset.xml => Ilyes512CodingStandard/ruleset.xml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ruleset.xml => Ilyes512CodingStandard/ruleset.xml (100%) diff --git a/ruleset.xml b/Ilyes512CodingStandard/ruleset.xml similarity index 100% rename from ruleset.xml rename to Ilyes512CodingStandard/ruleset.xml From 6d1f00f59fd47326a4adbba34e0cad7fdce31d91 Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Sat, 30 Dec 2023 15:30:33 +0000 Subject: [PATCH 05/16] Remove space before /> --- Ilyes512CodingStandard/ruleset.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Ilyes512CodingStandard/ruleset.xml b/Ilyes512CodingStandard/ruleset.xml index cb2de08..e2dacb7 100644 --- a/Ilyes512CodingStandard/ruleset.xml +++ b/Ilyes512CodingStandard/ruleset.xml @@ -6,9 +6,9 @@ > ilyes512/code-style ruleset - - - + + + From f25f481967640f0e1b41d7bad65bc243b9f2cbee Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Sat, 30 Dec 2023 19:00:15 +0000 Subject: [PATCH 06/16] Added extensions argument to config --- Ilyes512CodingStandard/ruleset.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/Ilyes512CodingStandard/ruleset.xml b/Ilyes512CodingStandard/ruleset.xml index e2dacb7..d047253 100644 --- a/Ilyes512CodingStandard/ruleset.xml +++ b/Ilyes512CodingStandard/ruleset.xml @@ -9,6 +9,7 @@ + From 9c7af23e5d40e4d7cb0a7f0011c5128e1cbcd41f Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Sat, 30 Dec 2023 19:05:14 +0000 Subject: [PATCH 07/16] Replaced PSR12 ruleset with the actual rules --- Ilyes512CodingStandard/ruleset.xml | 110 ++++++++++++++++++++++++++++- 1 file changed, 109 insertions(+), 1 deletion(-) diff --git a/Ilyes512CodingStandard/ruleset.xml b/Ilyes512CodingStandard/ruleset.xml index d047253..2d2b2c0 100644 --- a/Ilyes512CodingStandard/ruleset.xml +++ b/Ilyes512CodingStandard/ruleset.xml @@ -11,5 +11,113 @@ - + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + + + + + + + + + error + Method name "%s" must not be prefixed with an underscore to indicate visibility + + + + + + + + + + + + + + + 0 + + + 0 + + + + + + + + + + + + + 0 + + + 0 + + + + + + 0 + + + + + + 0 + + + 0 + + + + From 4482234d0425a51351c2096e354c3383f6a5c8c3 Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Sat, 30 Dec 2023 19:08:27 +0000 Subject: [PATCH 08/16] Added the rules that where not enabled but only mentioned in the PSR1 and PSR12 ruleset --- Ilyes512CodingStandard/ruleset.xml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Ilyes512CodingStandard/ruleset.xml b/Ilyes512CodingStandard/ruleset.xml index 2d2b2c0..5f03d35 100644 --- a/Ilyes512CodingStandard/ruleset.xml +++ b/Ilyes512CodingStandard/ruleset.xml @@ -22,6 +22,12 @@ + + + + + + @@ -120,4 +126,22 @@ + + + + + + + + + + + + + + + + + + From f16561aeaab38c2109b7efbc0a9699395cd3bd43 Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Sun, 28 Jan 2024 18:02:47 +0100 Subject: [PATCH 09/16] Misc updates --- .gitignore | 2 ++ LICENSE | 2 +- composer.json | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ff98b62..e968e70 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ /.phplint.cache /auth.json Taskfile.yml +docs.html +/temp diff --git a/LICENSE b/LICENSE index 9fae3ce..b9abb23 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2023 Ilyes Ahidar +Copyright 2024 Ilyes Ahidar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/composer.json b/composer.json index 05bdf23..e8da3dc 100644 --- a/composer.json +++ b/composer.json @@ -21,6 +21,14 @@ "dev-version-2": "2.0-dev" } }, + "scripts": { + "docs": "phpcs --standard=PSR12 --generator=html > docs.html", + "listsniffs": "phpcs --standard=./Ilyes512CodingStandard/ruleset.xml -e" + }, + "scripts-descriptions": { + "docs": "Generate the PSR12 documentation", + "listsniffs": "List all sniffs used by Ilyes512CodingStandard" + }, "minimum-stability": "dev", "prefer-stable": true, "config": { From 2b2a424df17c3f4964acf915ae8a1cc73d603756 Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Fri, 19 Apr 2024 17:21:10 +0200 Subject: [PATCH 10/16] Updated Docker image used --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index d7dd09f..2448e24 100644 --- a/.env +++ b/.env @@ -3,5 +3,5 @@ COMPOSE_PROJECT_NAME=code-style REGISTRY_HOST=ghcr.io REGISTRY_PATH=ilyes512 -IMAGE_REGISTRY_PHP=${REGISTRY_HOST}/${REGISTRY_PATH}/php83-fpm +IMAGE_REGISTRY_PHP=${REGISTRY_HOST}/${REGISTRY_PATH}/php83 IMAGE_TAG_PHP_VSCODE=vscode-1.0.0 From 4741effb3d01c9a1e1f65925bb8f414aee7d8fa6 Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Fri, 19 Apr 2024 18:10:58 +0200 Subject: [PATCH 11/16] Updated the readme install instructions --- README.md | 67 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 7983006..cc78ded 100644 --- a/README.md +++ b/README.md @@ -7,36 +7,55 @@ An ECS (Easy Coding Standards) codestyle package. You can install the package via composer: ```bash -composer require --dev ilyes512/code-style +composer require --dev ilyes512/code-style:^2.0-dev ``` ## Usage -Add a `ecs.php` file to the root of your project with the below contents. - -`ecs.php`: +Add a `phpcs.xml` file to the root of your project. The below config example is for a Laravel project: + +`phpcs.yml`: + +```xml + + + A Laravel project coding standard + + + + + + + + + + . + ./vendor + ./node_modules + ./.phpstan.cache + ./.phpunit.cache + ./bootstrap/cache + ./storage/framework + ./resources/css + ./resources/js + ./coverage + +``` -```php -import(__DIR__ . '/vendor/ilyes512/code-style/ecs.php'); +## Annotated ruleset - $containerConfigurator - ->parameters() - ->set( - Option::PATHS, - [ - __DIR__ . '/src', - __DIR__ . '/config', - __DIR__ . '/tests', - __DIR__ . '/ecs.php', - ], - ); -}; -``` +The [annotated ruleset](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset). From 8b1490d79ac8e9ff0abe338d35580130ac79aa0f Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Thu, 25 Apr 2024 18:22:59 +0200 Subject: [PATCH 12/16] Enforce single quotes when no interpolation is being applied --- Ilyes512CodingStandard/ruleset.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Ilyes512CodingStandard/ruleset.xml b/Ilyes512CodingStandard/ruleset.xml index 5f03d35..de712ca 100644 --- a/Ilyes512CodingStandard/ruleset.xml +++ b/Ilyes512CodingStandard/ruleset.xml @@ -144,4 +144,8 @@ + + + + From 67b712a1933de1eb6957eaf90e5d14c6b52853ee Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Thu, 25 Apr 2024 18:33:13 +0200 Subject: [PATCH 13/16] Added trailing comma rules for array, function declarations, function calls and closures --- Ilyes512CodingStandard/ruleset.xml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Ilyes512CodingStandard/ruleset.xml b/Ilyes512CodingStandard/ruleset.xml index de712ca..41c01e5 100644 --- a/Ilyes512CodingStandard/ruleset.xml +++ b/Ilyes512CodingStandard/ruleset.xml @@ -145,7 +145,14 @@ - + - + + + + + + + + From 0ea7c063c43685dc4bf52b6d5f08396bae874f74 Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Sun, 28 Apr 2024 15:54:31 +0200 Subject: [PATCH 14/16] Added custom namespace rules --- Ilyes512CodingStandard/ruleset.xml | 36 ++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/Ilyes512CodingStandard/ruleset.xml b/Ilyes512CodingStandard/ruleset.xml index 41c01e5..c3cfb26 100644 --- a/Ilyes512CodingStandard/ruleset.xml +++ b/Ilyes512CodingStandard/ruleset.xml @@ -145,14 +145,42 @@ - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 443b098167a63fc767e8ae3dd28c9081d33ba270 Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Sun, 28 Apr 2024 16:03:10 +0200 Subject: [PATCH 15/16] Add 1 newline between use types --- Ilyes512CodingStandard/ruleset.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Ilyes512CodingStandard/ruleset.xml b/Ilyes512CodingStandard/ruleset.xml index c3cfb26..304cf3d 100644 --- a/Ilyes512CodingStandard/ruleset.xml +++ b/Ilyes512CodingStandard/ruleset.xml @@ -175,7 +175,11 @@ - + + + + + From 40f125ef34386bcfa58814d499a924361b7135c2 Mon Sep 17 00:00:00 2001 From: Ilyes512 Date: Fri, 3 May 2024 11:31:08 +0200 Subject: [PATCH 16/16] Added declare strict types rule --- Ilyes512CodingStandard/ruleset.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Ilyes512CodingStandard/ruleset.xml b/Ilyes512CodingStandard/ruleset.xml index 304cf3d..256b129 100644 --- a/Ilyes512CodingStandard/ruleset.xml +++ b/Ilyes512CodingStandard/ruleset.xml @@ -187,4 +187,12 @@ + + + + + + + +