1 | <?php namespace Maqe\Qwatcher; |
||
9 | class Qwatcher |
||
10 | { |
||
11 | public function __construct() {} |
||
12 | |||
13 | /** |
||
14 | * Insert or update Track table depand on TracksInterface sub class |
||
15 | * |
||
16 | * @param TracksInterface $tracks Sub class that implements TracksInterface |
||
17 | * @return mixed |
||
18 | */ |
||
19 | public function tracks(TracksInterface $tracks) |
||
23 | |||
24 | /** |
||
25 | * Get the list of the queue track |
||
26 | * |
||
27 | * @return collection |
||
28 | */ |
||
29 | public function all() |
||
33 | |||
34 | /** |
||
35 | * Get the track record by id |
||
36 | * |
||
37 | * @param $id The track id |
||
38 | * @return object |
||
39 | */ |
||
40 | public function getById($id) |
||
44 | |||
45 | /** |
||
46 | * Get the track record by current status |
||
47 | * |
||
48 | * @param $status The track status |
||
49 | * @return collection |
||
50 | */ |
||
51 | public function getByStatus($status) |
||
64 | |||
65 | /** |
||
66 | * Get the track record by job name |
||
67 | * |
||
68 | * @param $name The job name |
||
69 | * @return collection |
||
70 | */ |
||
71 | public function getByJobName($name) |
||
78 | |||
79 | /** |
||
80 | * Transform records in tracks collection |
||
81 | * |
||
82 | * @param Collection $tracks The tracks collection |
||
83 | * @return Collection The tracks collection after transform |
||
84 | */ |
||
85 | protected function transform($track) |
||
93 | |||
94 | /** |
||
95 | * Transform records in tracks collection |
||
96 | * |
||
97 | * @param Collection $tracks The tracks collection |
||
98 | * @return Collection The tracks collection after transform |
||
99 | */ |
||
100 | protected function transforms($tracks) |
||
106 | |||
107 | /** |
||
108 | * Filter by process date is not null |
||
109 | * - succeed and failed must be null |
||
110 | * |
||
111 | * @param Builder $builder The tracks builder |
||
112 | * @return Builder The query builder with filter applied. |
||
113 | */ |
||
114 | protected function filterByProcess(Builder $builder) |
||
120 | |||
121 | /** |
||
122 | * Filter by succeed date is not null |
||
123 | * - process is not null |
||
124 | * - failed is null |
||
125 | * |
||
126 | * @param Builder $builder The tracks builder |
||
127 | * @return Builder The query builder with filter applied. |
||
128 | */ |
||
129 | protected function filterBySucceed(Builder $builder) |
||
135 | |||
136 | /** |
||
137 | * Filter by failed date is not null |
||
138 | * - succeed is null |
||
139 | * |
||
140 | * @param Builder $builder The tracks builder |
||
141 | * @return Builder The query builder with filter applied. |
||
142 | */ |
||
143 | protected function filterByFailed(Builder $builder) |
||
148 | } |
||
149 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: