| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function get(Result $result): int |
||
| 30 | { |
||
| 31 | $this->checkCollection(); |
||
| 32 | |||
| 33 | usort($this->collections, function ($a, $b) { |
||
| 34 | return $a->getScore() <=> $b->getScore(); |
||
| 35 | }); |
||
| 36 | $this->collections = array_reverse($this->collections); |
||
| 37 | |||
| 38 | foreach ($this->collections as $collection) { |
||
| 39 | if ($collection->check($result) === true) { |
||
| 40 | $score = $collection->getScore(); |
||
| 41 | break; |
||
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 45 | return $score; |
||
| 46 | } |
||
| 59 | } |
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..