| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | 1 | public function getCrew() |
|
| 26 | { |
||
| 27 | 1 | if (!empty($this->data->crew)) |
|
| 28 | { |
||
| 29 | 1 | foreach ($this->data->crew as $c) |
|
|
1 ignored issue
–
show
|
|||
| 30 | { |
||
| 31 | 1 | $crew = new Crew($this->tmdb, $c); |
|
| 32 | 1 | yield $crew; |
|
| 33 | } |
||
| 34 | } |
||
| 35 | 1 | } |
|
| 36 | |||
| 49 | } |
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: