@@ -141,14 +141,14 @@ public function generate(): array
141141 $ interval = $ now ->diff ($ expire );
142142 $ days = $ interval ->format ('%r%a ' );
143143
144- if (0 <= $ days ) {
145- if ( 1 >= $ days ) {
146- $ licenseInfo = ' license_1_day ' ;
147- } elseif ( 15 > $ days ) {
148- $ licenseInfo = ' license_15_days ' ;
149- } elseif ( 30 > $ days ) {
150- $ licenseInfo = ' license_30_days ' ;
151- }
144+ if (0 > $ days ) {
145+ $ licenseInfo = ' license_expired ' ;
146+ } elseif ( 1 >= $ days ) {
147+ $ licenseInfo = ' license_1_day ' ;
148+ } elseif ( 15 > $ days ) {
149+ $ licenseInfo = ' license_15_days ' ;
150+ } elseif ( 30 > $ days ) {
151+ $ licenseInfo = ' license_30_days ' ;
152152 }
153153 }
154154 }
@@ -249,6 +249,9 @@ public function compareInfo(array $previousInfo, array $lastInfo): array
249249 case 'license_1_day ' :
250250 $ notification ->setContent ('Expires today ' );
251251 break ;
252+ case 'license_expired ' :
253+ $ notification ->setContent ('Expired ' );
254+ break ;
252255 }
253256 $ notification ->setColor ($ this ->getColor ($ lastInfo ['license ' ]));
254257
@@ -282,6 +285,7 @@ public function infoFileExists(): bool
282285 private function getColor (string $ value ): string
283286 {
284287 switch ($ value ) {
288+ case 'license_expired ' :
285289 case 'license_1_day ' :
286290 case 'watermark_flood_stage ' :
287291 return 'red ' ;
0 commit comments