| 1 | <?php namespace Rossedman\Teamwork\Traits; |
||
| 3 | trait TimeTrait { |
||
| 4 | |||
| 5 | /** |
||
| 6 | * Time Entries |
||
| 7 | * GET /projects/{id}/time_entries.json |
||
| 8 | * |
||
| 9 | * @return mixed |
||
| 10 | */ |
||
| 11 | public function time() |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Create Time Entry |
||
| 18 | * POST /projects/{id}/time_entries.json |
||
| 19 | * |
||
| 20 | * @param $data |
||
| 21 | * |
||
| 22 | * @return mixed |
||
| 23 | */ |
||
| 24 | public function createTime($data) |
||
| 28 | |||
| 29 | } |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: