Total Complexity | 3 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class AllAssetInfoResponse extends AbstractResponse implements IAllAssetInfoResponseInterface |
||
11 | { |
||
12 | |||
13 | /** @var IAllAssetInfoResponseItemInterface $list */ |
||
14 | private EntityCollection $list; |
||
15 | |||
16 | public function __construct(array $data) |
||
17 | { |
||
18 | $list = new EntityCollection(); |
||
19 | |||
20 | if (!empty($data['list'])) { |
||
21 | array_map(function ($item) use ($list) { |
||
22 | $list->push(ResponseDtoBuilder::make(AllAssetInfoResponseItem::class, $item)); |
||
23 | }, $data['list']); |
||
24 | } |
||
25 | |||
26 | $this->list = $list; |
||
|
|||
27 | } |
||
28 | |||
29 | public function getAssets(): array |
||
32 | } |
||
33 | } |
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..