Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | class RiskLimitsResponse extends AbstractResponse implements IRiskLimitsResponseInterface |
||
12 | { |
||
13 | /** |
||
14 | * Cursor. Use the nextPageCursor token from the response to retrieve the next page of the result set |
||
15 | * @var string |
||
16 | */ |
||
17 | private string $cursor; |
||
18 | |||
19 | /** @var IRiskLimitsResponseItemInterface[] */ |
||
20 | private EntityCollection $list; |
||
21 | |||
22 | public function __construct(array $data) |
||
23 | { |
||
24 | $list = new EntityCollection(); |
||
25 | |||
26 | if (!empty($data['list'])) { |
||
27 | array_map(function ($item) use ($list) { |
||
28 | $list->push(ResponseDtoBuilder::make(RiskLimitsResponseItem::class, $item)); |
||
29 | }, $data['list']); |
||
30 | } |
||
31 | |||
32 | $this->cursor = $data['nextPageCursor']; |
||
33 | $this->list = $list; |
||
|
|||
34 | } |
||
35 | |||
36 | public function getRiskLimitList(): array |
||
37 | { |
||
38 | return $this->list->all(); |
||
39 | } |
||
40 | |||
41 | public function getCursor(string $cursor): ?string |
||
44 | } |
||
45 | } |
||
46 |
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..