Issues (2)

src/Tracking/Events/Event.php (1 issue)

Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ReliqArts\Logistiq\Tracking\Events;
6
7
use Illuminate\Queue\SerializesModels;
8
use ReliqArts\Logistiq\Tracking\Contracts\Event as EventContract;
9
use ReliqArts\Logistiq\Tracking\Contracts\Trackable;
10
11
abstract class Event implements EventContract
12
{
13
    use SerializesModels;
0 ignored issues
show
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by ReliqArts\Logistiq\Tracking\Events\Event: $id, $relations, $class, $connection, $keyBy
Loading history...
14
15
    /**
16
     * @var Trackable
17
     */
18
    protected $trackable;
19
20
    /**
21
     * Event constructor.
22
     *
23
     * @param Trackable $trackable
24
     */
25
    public function __construct(Trackable $trackable)
26
    {
27
        $this->trackable = $trackable;
28
    }
29
30
    /**
31
     * @return mixed|Trackable Usually a Trackable implementation.
32
     *                         However it may return an unexpected type if \Illuminate\Queue\SerializesModels trait
33
     *                         is used by subclass.
34
     *
35
     * @see \Illuminate\Queue\SerializesModels
36
     * @see \Illuminate\Contracts\Database\ModelIdentifier
37
     */
38
    public function getTrackable()
39
    {
40
        return $this->trackable;
41
    }
42
}
43