| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function compare(ReflectionClass $fromClass, ReflectionClass $toClass) : Changes |
||
| 19 | { |
||
| 20 | Assert::that($fromClass->getName())->same($toClass->getName()); |
||
| 21 | |||
| 22 | if ($toClass->isInterface() || ! $fromClass->isInterface()) { |
||
| 23 | // checking whether a class became an interface is done in `ClassBecameInterface` |
||
| 24 | return Changes::new(); |
||
| 25 | } |
||
| 26 | |||
| 27 | return Changes::fromArray([Change::changed( |
||
| 28 | sprintf('Interface %s became a class', $fromClass->getName()), |
||
| 29 | true |
||
| 30 | )]); |
||
| 33 |