Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | protected function cast(array $data) |
||
36 | { |
||
37 | $account = new AccountModel(); |
||
38 | |||
39 | $quota = new Quota(); |
||
40 | $quota->quotaUsed = $data['quota']['quotaUsed']; |
||
41 | $quota->quotaRemaining = $data['quota']['quotaRemaining']; |
||
42 | $quota->quotaTotal = $data['quota']['quotaTotal']; |
||
43 | |||
44 | $term = new Term(); |
||
45 | $term->startAt = new DateTimeImmutable($data['startAt']); |
||
|
|||
46 | $term->endAt = new DateTimeImmutable($data['endAt']); |
||
47 | |||
48 | $account->quota = $quota; |
||
49 | $account->term = $term; |
||
50 | |||
51 | return $account; |
||
52 | } |
||
54 |
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..