Issues (10)

src/Integration/Laravel/TableSyncable.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Umbrellio\TableSync\Integration\Laravel;
6
7
trait TableSyncable
8
{
9
    public static $isTableSyncEnabled = true;
10
11 14
    public static function bootTableSyncable()
12
    {
13 14
        if (static::$isTableSyncEnabled) {
14 13
            static::observe(TableSyncObserver::class);
15
        }
16
    }
17
18 10
    public function getTableSyncableAttributes(): array
19
    {
20 10
        return $this->getAttributes();
0 ignored issues
show
It seems like getAttributes() 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

20
        return $this->/** @scrutinizer ignore-call */ getAttributes();
Loading history...
21
    }
22
23 12
    public function classForSync(): string
24
    {
25 12
        return static::class;
26
    }
27
28 12
    public function exists(): bool
29
    {
30 12
        return $this->exists;
31
    }
32
}
33