| Conditions | 2 |
| Paths | 2 |
| Total Lines | 20 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 2 |
| Changes | 5 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | 45 | public function __construct(Media $mediaObj, $data) |
|
| 24 | { |
||
| 25 | 45 | $this->url = $data['url']; |
|
| 26 | |||
| 27 | 45 | $this->title = $data['title']; |
|
| 28 | |||
| 29 | 45 | $this->description = $data['description']; |
|
| 30 | |||
| 31 | 45 | $this->images = $data['images']; |
|
| 32 | |||
| 33 | 45 | $this->meta = new Meta($data['meta']); |
|
| 34 | |||
| 35 | 45 | $media = $mediaObj->get($data['url']); |
|
| 36 | |||
| 37 | 45 | if ($media !== []) { |
|
| 38 | 3 | $this->media = $media; |
|
|
|
|||
| 39 | 3 | } |
|
| 40 | |||
| 41 | 45 | $this->viewPath = __DIR__ . '/Templates'; |
|
| 42 | 45 | } |
|
| 43 | |||
| 104 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..