1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 20:14:04 +00:00

Convert time constrait options to int

This commit is contained in:
lukinovec 2022-11-28 15:00:28 +01:00
parent 16ab7e0435
commit 4b51323518

View file

@ -23,8 +23,8 @@ class ClearPendingTenants extends Command
// We compare the original expiration date to the new one to check if the new one is different later // We compare the original expiration date to the new one to check if the new one is different later
$originalExpirationDate = $expirationDate->copy()->toImmutable(); $originalExpirationDate = $expirationDate->copy()->toImmutable();
$olderThanDays = $this->option('older-than-days'); $olderThanDays = (int) $this->option('older-than-days');
$olderThanHours = $this->option('older-than-hours'); $olderThanHours = (int) $this->option('older-than-hours');
if ($olderThanDays && $olderThanHours) { if ($olderThanDays && $olderThanHours) {
$this->line("<options=bold,reverse;fg=red> Cannot use '--older-than-days' and '--older-than-hours' together \n"); // todo@cli refactor all of these styled command outputs to use $this->components $this->line("<options=bold,reverse;fg=red> Cannot use '--older-than-days' and '--older-than-hours' together \n"); // todo@cli refactor all of these styled command outputs to use $this->components