| 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 | $this->accessibleConstants($fromClass), |
||
| 21 | $this->accessibleConstants($toClass) |
||
| 22 | ); |
||
| 23 | |||
| 24 | return Changes::fromArray(array_values(array_map(function (ReflectionClassConstant $constant) use ($fromClass) : Change { |
||
| 25 | return Change::removed( |
||
| 26 | sprintf('Constant %s::%s was removed', $fromClass->getName(), $constant->getName()), |
||
| 27 | true |
||
| 28 | ); |
||
| 29 | }, $removedMethods))); |
||
| 30 | } |
||
| 39 | } |