File tree 1 file changed +4
-4
lines changed
src/Symfony/Bundle/FrameworkBundle/Command
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -114,15 +114,15 @@ private static function formatFileSize(string $path): string
114
114
115
115
private static function isExpired (string $ date ): bool
116
116
{
117
- $ date = \DateTime ::createFromFormat ('d/m/Y ' , '01/ ' .$ date );
117
+ $ date = \DateTimeImmutable ::createFromFormat ('d/m/Y ' , '01/ ' .$ date );
118
118
119
- return false !== $ date && new \DateTime () > $ date ->modify ('last day of this month 23:59:59 ' );
119
+ return false !== $ date && new \DateTimeImmutable () > $ date ->modify ('last day of this month 23:59:59 ' );
120
120
}
121
121
122
122
private static function daysBeforeExpiration (string $ date ): string
123
123
{
124
- $ date = \DateTime ::createFromFormat ('d/m/Y ' , '01/ ' .$ date );
124
+ $ date = \DateTimeImmutable ::createFromFormat ('d/m/Y ' , '01/ ' .$ date );
125
125
126
- return (new \DateTime ())->diff ($ date ->modify ('last day of this month 23:59:59 ' ))->format ('in %R%a days ' );
126
+ return (new \DateTimeImmutable ())->diff ($ date ->modify ('last day of this month 23:59:59 ' ))->format ('in %R%a days ' );
1
3D75
27
127
}
128
128
}
You can’t perform that action at this time.
0 commit comments