| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function compare(ReflectionClass $fromClass, ReflectionClass $toClass) : Changes |
||
| 16 | { |
||
| 17 | Assert::that($fromClass->getName())->same($toClass->getName()); |
||
| 18 | |||
| 19 | $removedMethods = array_diff_key( |
||
| 20 | array_change_key_case($this->accessibleMethods($fromClass), \CASE_UPPER), |
||
| 21 | array_change_key_case($this->accessibleMethods($toClass), \CASE_UPPER) |
||
| 22 | ); |
||
| 23 | |||
| 24 | return Changes::fromArray(array_values(array_map(function (ReflectionMethod $method) use ($fromClass) : Change { |
||
| 25 | return Change::removed( |
||
| 26 | sprintf('Method %s#%s() was removed', $fromClass->getName(), $method->getName()), |
||
| 27 | true |
||
| 28 | ); |
||
| 29 | }, $removedMethods))); |
||
| 30 | } |
||
| 46 | } |