| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 54 | 2 | public function parse(array $data) |
|
| 55 | { |
||
| 56 | 2 | $this->id = (int)$data['id']; |
|
| 57 | 2 | $this->name = (string)$data['name']; |
|
| 58 | 2 | $this->tags = (string)$data['tags']; |
|
| 59 | 2 | $this->privacy = (string)$data['privacy']; |
|
| 60 | 2 | $this->goneAt = (string)$data['gone_at']; |
|
| 61 | 2 | $this->size = (string)$data['size']; |
|
|
|
|||
| 62 | 2 | $this->mime = (string)$data['mime']; |
|
| 63 | 2 | $this->password = (string)$data['password']; |
|
| 64 | 2 | $this->url = (string)$data['url']; |
|
| 65 | 2 | $this->cdnUrl = (string)$data['cdn_url']; |
|
| 66 | 2 | $this->showUrl = (string)$data['show_url']; |
|
| 67 | 2 | $this->downloadUrl = (string)$data['download_url']; |
|
| 68 | 2 | } |
|
| 92 | } |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.