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