From 8e02bc00a8c7f9d2bcae0544bf185bda88970d67 Mon Sep 17 00:00:00 2001 From: Dariusz Ruminski Date: Fri, 6 Oct 2023 22:44:12 +0200 Subject: [PATCH] feat: use `ordered_types` in `@PhpCsFixer` --- src/Linter/TokenizerLinter.php | 2 +- src/RuleSet/Sets/PhpCsFixerSet.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Linter/TokenizerLinter.php b/src/Linter/TokenizerLinter.php index 01ec0371296..b0920d302ee 100644 --- a/src/Linter/TokenizerLinter.php +++ b/src/Linter/TokenizerLinter.php @@ -49,7 +49,7 @@ public function lintSource(string $source): LintingResultInterface Tokens::fromCode($source); return new TokenizerLintingResult(); - } catch (\ParseError|\CompileError $e) { + } catch (\CompileError|\ParseError $e) { return new TokenizerLintingResult($e); } } diff --git a/src/RuleSet/Sets/PhpCsFixerSet.php b/src/RuleSet/Sets/PhpCsFixerSet.php index 0bd66ffe137..f9fa314f87e 100644 --- a/src/RuleSet/Sets/PhpCsFixerSet.php +++ b/src/RuleSet/Sets/PhpCsFixerSet.php @@ -104,6 +104,7 @@ public function getRules(): array 'no_useless_return' => true, 'nullable_type_declaration_for_default_null_value' => false, 'ordered_class_elements' => true, + 'ordered_types' => true, 'php_unit_internal_class' => true, 'php_unit_test_class_requires_covers' => true, 'phpdoc_add_missing_param_annotation' => true,