1 | <?php |
||
8 | trait EventCollectionTrait |
||
9 | { |
||
10 | use CollectionTrait { |
||
11 | addJob as parentAddJob; |
||
12 | addJobs as parentAddJobs; |
||
13 | findJob as parentFindJob; |
||
14 | getJobs as parentGetJobs; |
||
15 | } |
||
16 | |||
17 | /** |
||
18 | * @param $name |
||
19 | * @param Event|null $event |
||
20 | * @return mixed |
||
21 | */ |
||
22 | public abstract function trigger($name, Event $event = null); |
||
23 | |||
24 | /** |
||
25 | * @inheritdoc |
||
26 | */ |
||
27 | protected function addJobs(array $jobs = []) |
||
28 | { |
||
29 | $this->ensureJobs(); |
||
30 | return $this->parentAddJobs($jobs); |
||
|
|||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @inheritdoc |
||
35 | */ |
||
36 | public function addJob($key, $job) |
||
37 | { |
||
38 | $this->ensureJobs(); |
||
39 | return $this->parentAddJob($key, $job); |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @inheritdoc |
||
44 | */ |
||
45 | public function getJobs() |
||
46 | { |
||
47 | $this->ensureJobs(); |
||
48 | return $this->parentGetJobs(); |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @inheritdoc |
||
53 | */ |
||
54 | public function findJob($identifier) |
||
55 | { |
||
56 | $this->ensureJobs(); |
||
57 | return $this->parentFindJob($identifier); |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * Ensure the jobs are all loaded |
||
62 | * |
||
63 | * @return static |
||
64 | */ |
||
65 | protected function ensureJobs() |
||
80 | } |
||
81 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.