File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 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
114114
115115 private static function isExpired (string $ date ): bool
116116 {
117- $ date = \DateTime ::createFromFormat ('d/m/Y ' , '01/ ' .$ date );
117+ $ date = \DateTimeImmutable ::createFromFormat ('d/m/Y ' , '01/ ' .$ date );
118118
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 ' );
120120 }
121121
122122 private static function daysBeforeExpiration (string $ date ): string
123123 {
124- $ date = \DateTime ::createFromFormat ('d/m/Y ' , '01/ ' .$ date );
124+ $ date = \DateTimeImmutable ::createFromFormat ('d/m/Y ' , '01/ ' .$ date );
125125
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 ' );
127127 }
128128}
You can’t perform that action at this time.
0 commit comments