Skip to content

Commit b24c6cd

Browse files
committed
Psalm
1 parent a3f8a64 commit b24c6cd

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

src/Console/Commands/GarbageCollectorCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function handle()
3232
}
3333
});
3434

35-
if (! $dry = $this->option('dry')) {
35+
if (! $this->option('dry')) {
3636
$ids->each(fn ($i) => $this->info('Scheduler id to complete: '.$i));
3737
}
3838

src/Models/Concerns/ConstraintsResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function constraintsDescriptions(): array
5656
return collect($this->constraints)
5757
->map(fn (string $event) => unserialize($event))
5858
->filter(fn ($event) => is_subclass_of($event, Descriptionable::class))
59-
->reduce(function ($base, Descriable $descriable) {
59+
->reduce(function ($base, Descriptionable $descriable) {
6060
return array_merge($base, $descriable::conditions());
6161
}, []);
6262
}

src/Models/MailatorLog.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
/**
99
* Class MailatorLog
10+
* @property string $status
1011
* @property Carbon $created_at
1112
* @package Binarcode\LaravelMailator\Models
1213
*/
@@ -17,8 +18,8 @@ public function getTable()
1718
return config('mailator.logs_table', 'mailator_logs');
1819
}
1920

20-
const STATUS_FAILED = 'failed';
21-
const STATUS_SENT = 'sent';
21+
public const STATUS_FAILED = 'failed';
22+
public const STATUS_SENT = 'sent';
2223

2324
protected $fillable = [
2425
'name',

src/Models/MailatorSchedule.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,12 @@ public function toDays(): int
256256
{
257257
//let's say we have 1 day and 2 hours till day job ends
258258
//so we will floor it to 1, and will send the reminder in time
259-
return floor($this->delay_minutes / static::MINUTES_IN_DAY);
259+
return (int) floor($this->delay_minutes / static::MINUTES_IN_DAY);
260260
}
261261

262262
public function toHours(): int
263263
{
264-
return floor($this->delay_minutes / static::MINUTES_IN_HOUR);
264+
return (int) floor($this->delay_minutes / static::MINUTES_IN_HOUR);
265265
}
266266

267267
public function minutes(int $number): self
@@ -449,7 +449,7 @@ public function tag(string | array $tag): self
449449
public function getReadableConditionAttribute(): string
450450
{
451451
if ($this->isManual()) {
452-
return __('manual');
452+
return (string) __('manual');
453453
}
454454

455455
$condition = $this->toDays().' day(s)';

0 commit comments

Comments
 (0)