Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function compare(ReflectionClass $fromClass, ReflectionClass $toClass) : Changes |
||
26 | { |
||
27 | $methodsFrom = $this->methods($fromClass); |
||
28 | $methodsTo = $this->methods($toClass); |
||
29 | $commonMethods = array_intersect_key($methodsFrom, $methodsTo); |
||
30 | |||
31 | return array_reduce( |
||
32 | array_keys($commonMethods), |
||
33 | function (Changes $accumulator, string $methodName) use ($methodsFrom, $methodsTo) : Changes { |
||
34 | return $accumulator->mergeWith($this->checkMethod->compare( |
||
35 | $methodsFrom[$methodName], |
||
36 | $methodsTo[$methodName]) |
||
37 | ); |
||
38 | }, |
||
39 | Changes::new() |
||
40 | ); |
||
56 |
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..