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 | 75 | public function __construct(Media $mediaObj, $data) |
|
24 | { |
||
25 | 75 | $this->url = $data['url']; |
|
26 | |||
27 | 75 | $this->title = $data['title']; |
|
28 | |||
29 | 75 | $this->description = $data['description']; |
|
30 | |||
31 | 75 | $this->images = $data['images']; |
|
32 | |||
33 | 75 | $this->meta = new Meta($data['meta']); |
|
34 | |||
35 | 75 | $media = $mediaObj->get($data['url']); |
|
36 | |||
37 | 75 | if ($media !== []) { |
|
38 | 6 | $this->media = $media; |
|
|
|||
39 | 6 | } |
|
40 | |||
41 | 75 | $this->viewPath = __DIR__ . '/Templates'; |
|
42 | 75 | } |
|
43 | |||
103 |
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..