diff --git a/composer.json b/composer.json index 4a8431c..db6d596 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "require": { "php": "^7.4 || ^8.0", "kubawerlos/php-cs-fixer-custom-fixers": "^3.16.2", - "php-cs-fixer/shim": "^3.22" + "friendsofphp/php-cs-fixer": "^3.22" }, "require-dev": { "phpunit/phpunit": "^9.6.11", @@ -28,10 +28,8 @@ ], "verify": [ "php-cs-fixer fix -vvv --diff --dry-run", - "mkdir -p ./var", - "@composer require friendsofphp/php-cs-fixer --no-interaction --working-dir=./var", "psalm --no-progress --shepherd", - "phpunit --bootstrap=./var/vendor/autoload.php --no-configuration ./tests" + "phpunit --no-configuration ./tests" ] } } diff --git a/psalm.xml b/psalm.xml index cb48cdf..d00d7aa 100644 --- a/psalm.xml +++ b/psalm.xml @@ -6,7 +6,7 @@ xsi:schemaLocation='https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd' findUnusedBaselineEntry='true' findUnusedCode='false' - autoloader='./var/vendor/autoload.php' + autoloader='vendor/autoload.php' > diff --git a/src/Unwanted.php b/src/Unwanted.php index f2d6b96..56a87b0 100644 --- a/src/Unwanted.php +++ b/src/Unwanted.php @@ -4,17 +4,6 @@ namespace Tpay\CodingStandards; -use PhpCsFixerCustomFixers\Fixer\ConstructorEmptyBracesFixer; -use PhpCsFixerCustomFixers\Fixer\DeclareAfterOpeningTagFixer; -use PhpCsFixerCustomFixers\Fixer\EmptyFunctionBodyFixer; -use PhpCsFixerCustomFixers\Fixer\NoImportFromGlobalNamespaceFixer; -use PhpCsFixerCustomFixers\Fixer\NoNullableBooleanTypeFixer; -use PhpCsFixerCustomFixers\Fixer\NoReferenceInFunctionDefinitionFixer; -use PhpCsFixerCustomFixers\Fixer\PhpdocOnlyAllowedAnnotationsFixer; -use PhpCsFixerCustomFixers\Fixer\PhpdocVarAnnotationToAssertFixer; -use PhpCsFixerCustomFixers\Fixer\PromotedConstructorPropertyFixer; -use PhpCsFixerCustomFixers\Fixer\ReadonlyPromotedPropertiesFixer; - final class Unwanted { public static function isUnwanted(string $name): bool @@ -35,26 +24,31 @@ public static function isUnwanted(string $name): bool 'not_operator_with_space', 'not_operator_with_successor_space', 'octal_notation', + 'php_unit_attributes', 'php_unit_internal_class', 'php_unit_size_class', 'php_unit_strict', 'php_unit_test_class_requires_covers', 'phpdoc_summary', 'phpdoc_to_property_type', + 'phpdoc_to_return_type', 'single_line_comment_spacing', 'single_line_throw', + 'string_implicit_backslashes', 'strict_param', 'void_return', - ConstructorEmptyBracesFixer::name(), - DeclareAfterOpeningTagFixer::name(), - EmptyFunctionBodyFixer::name(), - NoImportFromGlobalNamespaceFixer::name(), - NoNullableBooleanTypeFixer::name(), - NoReferenceInFunctionDefinitionFixer::name(), - PhpdocOnlyAllowedAnnotationsFixer::name(), - PhpdocVarAnnotationToAssertFixer::name(), - PromotedConstructorPropertyFixer::name(), - ReadonlyPromotedPropertiesFixer::name(), + 'PhpCsFixerCustomFixers/constructor_empty_braces', + 'PhpCsFixerCustomFixers/declare_after_opening_tag', + 'PhpCsFixerCustomFixers/empty_function_body', + 'PhpCsFixerCustomFixers/no_import_from_global_namespace', + 'PhpCsFixerCustomFixers/no_nullable_boolean_type', + 'PhpCsFixerCustomFixers/no_reference_in_function_definition', + 'PhpCsFixerCustomFixers/phpdoc_only_allowed_annotations', + 'PhpCsFixerCustomFixers/phpdoc_var_annotation_to_assert', + 'PhpCsFixerCustomFixers/promoted_constructor_property', + 'PhpCsFixerCustomFixers/readonly_promoted_properties', + 'PhpCsFixerCustomFixers/phpdoc_tag_no_named_arguments', + 'PhpCsFixerCustomFixers/typed_class_constant', ], true, );