From 92fbbac0797eb58f246fa6a0d80e7d4fb188ca1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Sat, 19 Mar 2022 11:28:22 +0100 Subject: [PATCH] Enhancement: Enable date_time_create_from_format_call fixer --- CHANGELOG.md | 3 +++ src/RuleSet/Php74.php | 2 +- src/RuleSet/Php80.php | 2 +- src/RuleSet/Php81.php | 2 +- test/Unit/RuleSet/Php74Test.php | 2 +- test/Unit/RuleSet/Php80Test.php | 2 +- test/Unit/RuleSet/Php81Test.php | 2 +- 7 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a010e1be..00707ab7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ For a full diff see [`4.3.0...main`][4.3.0...main]. ### Changed - Updated `friendsofphp/php-cs-fixer` ([#591]), by [@dependabot] +- Enabled `date_time_create_from_format_call` fixer ([#592]), by [@localheinz] + ## [`4.3.0`][4.3.0] @@ -624,6 +626,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0]. [#587]: https://github.com/ergebnis/php-cs-fixer-config/pull/587 [#588]: https://github.com/ergebnis/php-cs-fixer-config/pull/588 [#591]: https://github.com/ergebnis/php-cs-fixer-config/pull/591 +[#592]: https://github.com/ergebnis/php-cs-fixer-config/pull/592 [@dependabot]: https://github.com/apps/dependabot [@linuxjuggler]: https://github.com/linuxjuggler diff --git a/src/RuleSet/Php74.php b/src/RuleSet/Php74.php index 6fe1eb5c..7094df34 100644 --- a/src/RuleSet/Php74.php +++ b/src/RuleSet/Php74.php @@ -103,7 +103,7 @@ final class Php74 extends AbstractRuleSet implements ExplicitRuleSet 'control_structure_continuation_position' => [ 'position' => 'same_line', ], - 'date_time_create_from_format_call' => false, + 'date_time_create_from_format_call' => true, 'date_time_immutable' => true, 'declare_equal_normalize' => [ 'space' => 'none', diff --git a/src/RuleSet/Php80.php b/src/RuleSet/Php80.php index 9b765c56..9a09f3d7 100644 --- a/src/RuleSet/Php80.php +++ b/src/RuleSet/Php80.php @@ -103,7 +103,7 @@ final class Php80 extends AbstractRuleSet implements ExplicitRuleSet 'control_structure_continuation_position' => [ 'position' => 'same_line', ], - 'date_time_create_from_format_call' => false, + 'date_time_create_from_format_call' => true, 'date_time_immutable' => true, 'declare_equal_normalize' => [ 'space' => 'none', diff --git a/src/RuleSet/Php81.php b/src/RuleSet/Php81.php index f97ea34e..397b3d79 100644 --- a/src/RuleSet/Php81.php +++ b/src/RuleSet/Php81.php @@ -103,7 +103,7 @@ final class Php81 extends AbstractRuleSet implements ExplicitRuleSet 'control_structure_continuation_position' => [ 'position' => 'same_line', ], - 'date_time_create_from_format_call' => false, + 'date_time_create_from_format_call' => true, 'date_time_immutable' => true, 'declare_equal_normalize' => [ 'space' => 'none', diff --git a/test/Unit/RuleSet/Php74Test.php b/test/Unit/RuleSet/Php74Test.php index 6f13662d..dd6d0677 100644 --- a/test/Unit/RuleSet/Php74Test.php +++ b/test/Unit/RuleSet/Php74Test.php @@ -109,7 +109,7 @@ final class Php74Test extends ExplicitRuleSetTestCase 'control_structure_continuation_position' => [ 'position' => 'same_line', ], - 'date_time_create_from_format_call' => false, + 'date_time_create_from_format_call' => true, 'date_time_immutable' => true, 'declare_equal_normalize' => [ 'space' => 'none', diff --git a/test/Unit/RuleSet/Php80Test.php b/test/Unit/RuleSet/Php80Test.php index 3bab7784..e1679fd8 100644 --- a/test/Unit/RuleSet/Php80Test.php +++ b/test/Unit/RuleSet/Php80Test.php @@ -109,7 +109,7 @@ final class Php80Test extends ExplicitRuleSetTestCase 'control_structure_continuation_position' => [ 'position' => 'same_line', ], - 'date_time_create_from_format_call' => false, + 'date_time_create_from_format_call' => true, 'date_time_immutable' => true, 'declare_equal_normalize' => [ 'space' => 'none', diff --git a/test/Unit/RuleSet/Php81Test.php b/test/Unit/RuleSet/Php81Test.php index 0d3eebc7..1314661a 100644 --- a/test/Unit/RuleSet/Php81Test.php +++ b/test/Unit/RuleSet/Php81Test.php @@ -109,7 +109,7 @@ final class Php81Test extends ExplicitRuleSetTestCase 'control_structure_continuation_position' => [ 'position' => 'same_line', ], - 'date_time_create_from_format_call' => false, + 'date_time_create_from_format_call' => true, 'date_time_immutable' => true, 'declare_equal_normalize' => [ 'space' => 'none',