Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
]
}
}
2 changes: 1 addition & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
>
<projectFiles>
<directory name='./src' />
Expand Down
36 changes: 15 additions & 21 deletions src/Unwanted.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
);
Expand Down