Skip to content

Commit

Permalink
Enhancement: Enable and configure nullable_type_declaration fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Jul 5, 2023
1 parent d049202 commit a908d7c
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ For a full diff see [`5.10.0...main`][5.10.0...main].
## Changed

- Updated `friendsofphp/php-cs-fixer` ([#815]), by [@dependabot]
- Enabled and configured the `nullable_type_declaration` fixer ([#816]), by [@localheinz]

## [`5.10.0`][5.10.0]

Expand Down Expand Up @@ -1040,6 +1041,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0].
[#805]: https://github.com/ergebnis/php-cs-fixer-config/pull/805
[#810]: https://github.com/ergebnis/php-cs-fixer-config/pull/810
[#815]: https://github.com/ergebnis/php-cs-fixer-config/pull/815
[#816]: https://github.com/ergebnis/php-cs-fixer-config/pull/816

[@dependabot]: https://github.com/apps/dependabot
[@linuxjuggler]: https://github.com/linuxjuggler
Expand Down
4 changes: 3 additions & 1 deletion src/RuleSet/Php80.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ final class Php80 extends AbstractRuleSet implements ExplicitRuleSet
'normalize_index_brace' => true,
'not_operator_with_space' => false,
'not_operator_with_successor_space' => false,
'nullable_type_declaration' => false,
'nullable_type_declaration' => [
'syntax' => 'question_mark',
],
'nullable_type_declaration_for_default_null_value' => [
'use_nullable_type_declaration' => true,
],
Expand Down
4 changes: 3 additions & 1 deletion src/RuleSet/Php81.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ final class Php81 extends AbstractRuleSet implements ExplicitRuleSet
'normalize_index_brace' => true,
'not_operator_with_space' => false,
'not_operator_with_successor_space' => false,
'nullable_type_declaration' => false,
'nullable_type_declaration' => [
'syntax' => 'question_mark',
],
'nullable_type_declaration_for_default_null_value' => [
'use_nullable_type_declaration' => true,
],
Expand Down
4 changes: 3 additions & 1 deletion src/RuleSet/Php82.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ final class Php82 extends AbstractRuleSet implements ExplicitRuleSet
'normalize_index_brace' => true,
'not_operator_with_space' => false,
'not_operator_with_successor_space' => false,
'nullable_type_declaration' => false,
'nullable_type_declaration' => [
'syntax' => 'question_mark',
],
'nullable_type_declaration_for_default_null_value' => [
'use_nullable_type_declaration' => true,
],
Expand Down
4 changes: 3 additions & 1 deletion test/Unit/RuleSet/Php80Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,9 @@ final class Php80Test extends ExplicitRuleSetTestCase
'normalize_index_brace' => true,
'not_operator_with_space' => false,
'not_operator_with_successor_space' => false,
'nullable_type_declaration' => false,
'nullable_type_declaration' => [
'syntax' => 'question_mark',
],
'nullable_type_declaration_for_default_null_value' => [
'use_nullable_type_declaration' => true,
],
Expand Down
4 changes: 3 additions & 1 deletion test/Unit/RuleSet/Php81Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,9 @@ final class Php81Test extends ExplicitRuleSetTestCase
'normalize_index_brace' => true,
'not_operator_with_space' => false,
'not_operator_with_successor_space' => false,
'nullable_type_declaration' => false,
'nullable_type_declaration' => [
'syntax' => 'question_mark',
],
'nullable_type_declaration_for_default_null_value' => [
'use_nullable_type_declaration' => true,
],
Expand Down
4 changes: 3 additions & 1 deletion test/Unit/RuleSet/Php82Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,9 @@ final class Php82Test extends ExplicitRuleSetTestCase
'normalize_index_brace' => true,
'not_operator_with_space' => false,
'not_operator_with_successor_space' => false,
'nullable_type_declaration' => false,
'nullable_type_declaration' => [
'syntax' => 'question_mark',
],
'nullable_type_declaration_for_default_null_value' => [
'use_nullable_type_declaration' => true,
],
Expand Down

0 comments on commit a908d7c

Please sign in to comment.