| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function compare(ReflectionMethod $fromMethod, ReflectionMethod $toMethod) : Changes |
||
| 19 | { |
||
| 20 | $scopeFrom = $this->methodScope($fromMethod); |
||
| 21 | $scopeTo = $this->methodScope($toMethod); |
||
| 22 | |||
| 23 | if ($scopeFrom === $scopeTo) { |
||
| 24 | return Changes::new(); |
||
| 25 | } |
||
| 26 | |||
| 27 | return Changes::fromArray([Change::changed( |
||
| 28 | sprintf( |
||
| 29 | 'Method %s() of class %s changed scope from %s to %s', |
||
| 30 | $fromMethod->getName(), |
||
| 31 | $fromMethod->getDeclaringClass()->getName(), |
||
| 32 | $scopeFrom, |
||
| 33 | $scopeTo |
||
| 34 | ), |
||
| 35 | true |
||
| 36 | ), |
||
| 45 |