1 | <?php |
||
8 | class Task extends TeamworkObject |
||
9 | { |
||
10 | use RestfulTrait, TimeTrait; |
||
11 | |||
12 | protected $wrapper = 'task'; |
||
13 | protected $endpoint = 'tasks'; |
||
14 | |||
15 | /** |
||
16 | * Get All Tasks |
||
17 | * GET /tasks.json |
||
18 | * |
||
19 | * @param null $args |
||
20 | * |
||
21 | * @return mixed |
||
22 | */ |
||
23 | public function all($args = null) |
||
29 | |||
30 | /** |
||
31 | * Complete A Task |
||
32 | * PUT tasks/{id}/complete.json |
||
33 | * |
||
34 | * @return mixed |
||
35 | */ |
||
36 | public function complete() |
||
40 | |||
41 | /** |
||
42 | * Uncomplete A Task |
||
43 | * PUT tasks/{id}/uncomplete.json |
||
44 | * |
||
45 | * @return mixed |
||
46 | */ |
||
47 | public function uncomplete() |
||
51 | |||
52 | /** |
||
53 | * Time Totals |
||
54 | * GET /projects/{id}/time/total.json |
||
55 | * |
||
56 | * @return mixed |
||
57 | */ |
||
58 | public function timeTotal() |
||
62 | |||
63 | /** |
||
64 | * Create Time Entry |
||
65 | * POST /tasks/{id}/time_entries.json |
||
66 | * |
||
67 | * @param $data |
||
68 | * |
||
69 | * @return mixed |
||
70 | */ |
||
71 | public function createTime($data) |
||
75 | |||
76 | /** |
||
77 | * Edit A Task |
||
78 | * PUT tasks/{id}.json |
||
79 | * |
||
80 | * @return mixed |
||
81 | */ |
||
82 | public function edit($args) |
||
86 | } |
||
87 |
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: