| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function compare(ReflectionProperty $fromProperty, ReflectionProperty $toProperty) : Changes |
||
| 23 | { |
||
| 24 | $fromPropertyDefaultValue = $fromProperty->getDefaultValue(); |
||
| 25 | $toPropertyDefaultValue = $toProperty->getDefaultValue(); |
||
| 26 | |||
| 27 | if ($fromPropertyDefaultValue === $toPropertyDefaultValue) { |
||
| 28 | return Changes::new(); |
||
| 29 | } |
||
| 30 | |||
| 31 | return Changes::fromArray([ |
||
| 32 | Change::changed( |
||
| 33 | sprintf( |
||
| 34 | 'Property %s changed default value from %s to %s', |
||
| 35 | $this->formatProperty->__invoke($fromProperty), |
||
| 36 | var_export($fromPropertyDefaultValue, true), |
||
| 37 | var_export($toPropertyDefaultValue, true) |
||
| 38 | ), |
||
| 39 | true |
||
| 40 | ) |
||
| 44 |