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