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