diff --git a/composer.json b/composer.json index 9d908b9..1574684 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,10 @@ ], "config": { "preferred-install": "dist", - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } }, "require": { "php": "^7.2 || ^8.0", diff --git a/config/set/php-cs-fixer-custom.php b/config/set/php-cs-fixer-custom.php index a181cdc..a4fedf9 100644 --- a/config/set/php-cs-fixer-custom.php +++ b/config/set/php-cs-fixer-custom.php @@ -2,10 +2,8 @@ declare(strict_types=1); -use PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer; use PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer; use PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer; -use PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer; use PhpCsFixer\Fixer\Import\OrderedImportsFixer; use PhpCsFixer\Fixer\Operator\ConcatSpaceFixer; use PhpCsFixer\Fixer\Operator\IncrementStyleFixer; @@ -23,12 +21,6 @@ $containerConfigurator->import(PhpCsFixerSetList::PHP_CS_FIXER); $services = $containerConfigurator->services(); - $services->set(ArraySyntaxFixer::class) - ->call('configure', [ - [ - 'syntax' => 'short', - ], - ]); $services->set(ClassAttributesSeparationFixer::class); $services->set(ConcatSpaceFixer::class) ->call('configure', [ @@ -84,11 +76,4 @@ ], ]); $services->set(SimplifiedNullReturnFixer::class); - - $services->set(VisibilityRequiredFixer::class) - ->call('configure', [ - [ - 'elements' => ['property', 'method', 'const'], - ], - ]); }; diff --git a/config/set/slevomat-coding-standard.php b/config/set/slevomat-coding-standard.php index e32fe6b..5fb7b36 100644 --- a/config/set/slevomat-coding-standard.php +++ b/config/set/slevomat-coding-standard.php @@ -33,7 +33,6 @@ use SlevomatCodingStandard\Sniffs\Exceptions\DeadCatchSniff; use SlevomatCodingStandard\Sniffs\Exceptions\ReferenceThrowableOnlySniff; use SlevomatCodingStandard\Sniffs\Functions\UnusedInheritedVariablePassedToClosureSniff; -use SlevomatCodingStandard\Sniffs\Functions\UnusedParameterSniff; use SlevomatCodingStandard\Sniffs\Functions\UselessParameterDefaultValueSniff; use SlevomatCodingStandard\Sniffs\Namespaces\FullyQualifiedClassNameInAnnotationSniff; use SlevomatCodingStandard\Sniffs\Namespaces\NamespaceDeclarationSniff; @@ -56,7 +55,6 @@ use SlevomatCodingStandard\Sniffs\TypeHints\LongTypeHintsSniff; use SlevomatCodingStandard\Sniffs\TypeHints\NullableTypeForNullDefaultValueSniff; use SlevomatCodingStandard\Sniffs\TypeHints\NullTypeHintOnLastPositionSniff; -use SlevomatCodingStandard\Sniffs\TypeHints\ParameterTypeHintSniff; use SlevomatCodingStandard\Sniffs\TypeHints\ParameterTypeHintSpacingSniff; use SlevomatCodingStandard\Sniffs\TypeHints\PropertyTypeHintSniff; use SlevomatCodingStandard\Sniffs\TypeHints\ReturnTypeHintSniff; diff --git a/correct/TestClass.php b/correct/TestClass.php index cca9500..4cc23c3 100644 --- a/correct/TestClass.php +++ b/correct/TestClass.php @@ -27,7 +27,7 @@ final class TestClass implements TestableContract private const A = 1; /** - * @var array + * @var array */ public static $config = [ // test diff --git a/src/LaravelSet.php b/src/LaravelSet.php index fce04d3..3a72632 100644 --- a/src/LaravelSet.php +++ b/src/LaravelSet.php @@ -9,9 +9,9 @@ final class LaravelSet extends AbstractRuleSetDescription { /** - * @var mixed[]|mixed + * @var mixed[] */ - private $rules; + private $rules = []; /** * @param mixed[] $rules