1 | <?php |
||
17 | class Schedule extends Component |
||
18 | { |
||
19 | /** |
||
20 | * @var array All the events to scheduled |
||
21 | */ |
||
22 | protected $_events = []; |
||
23 | |||
24 | /** |
||
25 | * Register a callback style schedule event. |
||
26 | * |
||
27 | * @param \Closure $callback |
||
28 | * @param array $parameters |
||
29 | * |
||
30 | * @return Event |
||
31 | */ |
||
32 | 1 | public function call($callback, array $parameters = []) |
|
38 | |||
39 | /** |
||
40 | * Register a yii console command. |
||
41 | * |
||
42 | * @param string $command |
||
43 | * |
||
44 | * @return Event |
||
45 | */ |
||
46 | 2 | public function command($command) |
|
50 | |||
51 | /** |
||
52 | * Register a new command event to schedule. |
||
53 | * |
||
54 | * @param string $command |
||
55 | * |
||
56 | * @return Event |
||
57 | */ |
||
58 | 3 | public function exec($command) |
|
64 | |||
65 | /** |
||
66 | * Get all scheduled events. |
||
67 | * |
||
68 | * @return array |
||
69 | */ |
||
70 | 3 | public function getEvents() |
|
74 | |||
75 | /** |
||
76 | * Get all of the events on the schedule that are due. |
||
77 | * |
||
78 | * @param Application $app |
||
79 | * |
||
80 | * @return array |
||
81 | */ |
||
82 | public function dueEvents(Application $app) |
||
88 | } |
||
89 |
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: