Issues (38)

src/Models/HasPullAt.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace IproSync\Models;
4
5
use Carbon\Carbon;
6
7
trait HasPullAt
8
{
9 3
    public function getHasPullAtCastsAttr()
10
    {
11 3
        return [
12 3
            'last_pull_at' => 'datetime',
13 3
        ];
14
    }
15
16
    public function fillPulled(?Carbon $datetime = null): static
17
    {
18
        return $this->fill([
0 ignored issues
show
It seems like fill() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

18
        return $this->/** @scrutinizer ignore-call */ fill([
Loading history...
19
            'last_pull_at' => $datetime ?? Carbon::now(),
20
        ]);
21
    }
22
}
23