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