Conditions | 3 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
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 | return Changes::fromArray([Change::changed( |
||
29 | sprintf('Class %s became an interface', $fromClass->getName()), |
||
30 | true |
||
31 | )]); |
||
34 |