8000 Updated Rector to commit b0c89a98a0eb4a62d3141d950484d6e3ea7fdbda · rectorphp/rector@cecbffb · GitHub
[go: up one dir, main page]

Skip to content

Commit cecbffb

Browse files
committed
Updated Rector to commit b0c89a98a0eb4a62d3141d950484d6e3ea7fdbda
rectorphp/rector-src@b0c89a9 fix: Convert DateTime to Carbon properly when hours/minutes/seconds are used (#6176)
1 parent dd8c5b5 commit cecbffb

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

rules/Carbon/NodeFactory/CarbonCallFactory.php

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,45 @@ final class CarbonCallFactory
2828
* @see https://regex101.com/r/6VUUQF/1
2929
*/
3030
private const PLUS_MONTH_COUNT_REGEX = '#\\+(\\s+)?(?<count>\\d+)(\\s+)?(month|months)#';
31+
/**
32+
* @var string
33+
* @see https://regex101.com/r/dWRjk5/1
34+
*/
35+
private const PLUS_HOUR_COUNT_REGEX = '#\\+(\\s+)?(?<count>\\d+)(\\s+)?(hour|hours)#';
36+
/**
37+
* @var string
38+
* @see https://regex101.com/r/dfK0Ri/1
39+
*/
40+
private const PLUS_MINUTE_COUNT_REGEX = '#\\+(\\s+)?(?<count>\\d+)(\\s+)?(minute|minuts)#';
41+
/**
42+
* @var string
43+
* @see https://regex101.com/r/o7QDYL/1
44+
*/
45+
private const PLUS_SECOND_COUNT_REGEX = '#\\+(\\s+)?(?<count>\\d+)(\\s+)?(second|seconds)#';
3146
/**
3247
* @var string
3348
* @see https://regex101.com/r/IvyT7w/1
3449
*/
3550
private const MINUS_MONTH_COUNT_REGEX = '#-(\\s+)?(?<count>\\d+)(\\s+)?(month|months)#';
51+
/**
52+
* @var string
53+
* @see https://regex101.com/r/bICKg6/1
54+
*/
55+
private const MINUS_HOUR_COUNT_REGEX = '#-(\\s+)?(?<count>\\d+)(\\s+)?(hour|hours)#';
56+
/**
57+
* @var string
58+
* @see https://regex101.com/r/WILFvX/1
59+
*/
60+
private const MINUS_MINUTE_COUNT_REGEX = '#-(\\s+)?(?<count>\\d+)(\\s+)?(minute|minutes)#';
61+
/**
62+
* @var string
63+
* @see https://regex101.com/r/FwCUup/1
64+
*/
65+
private const MINUS_SECOND_COUNT_REGEX = '#-(\\s+)?(?<count>\\d+)(\\s+)?(second|seconds)#';
3666
/**
3767
* @var array<self::*_REGEX, string>
3868
*/
39-
private const REGEX_TO_METHOD_NAME_MAP = [self::PLUS_DAY_COUNT_REGEX => 'addDays', self::MINUS_DAY_COUNT_REGEX => 'subDays', self::PLUS_MONTH_COUNT_REGEX => 'addMonths', self::MINUS_MONTH_COUNT_REGEX => 'subMonths'];
69+
private const REGEX_TO_METHOD_NAME_MAP = [self::PLUS_DAY_COUNT_REGEX => 'addDays', self::MINUS_DAY_COUNT_REGEX => 'subDays', self::PLUS_MONTH_COUNT_REGEX => 'addMonths', self::MINUS_MONTH_COUNT_REGEX => 'subMonths', self::PLUS_HOUR_COUNT_REGEX => 'addHours', self::MINUS_HOUR_COUNT_REGEX => 'subHours', self::PLUS_MINUTE_COUNT_REGEX => 'addMinutes', self::MINUS_MINUTE_COUNT_REGEX => 'subMinutes', self::PLUS_SECOND_COUNT_REGEX => 'addSeconds', self::MINUS_SECOND_COUNT_REGEX => 'subSeconds'];
4070
/**
4171
* @return \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall
4272
*/

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = '29e926608b0008df286370f94cf5c26b4aa86226';
22+
public const PACKAGE_VERSION = 'b0c89a98a0eb4a62d3141d950484d6e3ea7fdbda';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2024-07-22 22:16:46';
27+
public const RELEASE_DATE = '2024-07-23 18:02:45';
2828
/**
2929
* @var int
3030
*/

vendor/scoper-autoload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// Restore the backup and ensure the excluded files are properly marked as loaded
1515
$GLOBALS['__composer_autoload_files'] = \array_merge(
1616
$existingComposerAutoloadFiles,
17-
\array_fill_keys(['5928a00fa978807cf85d90ec3f4b0147', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a'], true)
17+
\array_fill_keys(['0e6d7bf4a5811bfa5cf40c5ccd6fae6a', '5928a00fa978807cf85d90ec3f4b0147'], true)
1818
);
1919

2020
return $loader;

0 commit comments

Comments
 (0)
0