| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function compare(ReflectionFunctionAbstract $fromFunction, ReflectionFunctionAbstract $toFunction) : Changes |
||
| 19 | { |
||
| 20 | $fromRequiredParameters = $fromFunction->getNumberOfRequiredParameters(); |
||
| 21 | $toRequiredParameters = $toFunction->getNumberOfRequiredParameters(); |
||
| 22 | |||
| 23 | if ($fromRequiredParameters >= $toRequiredParameters) { |
||
| 24 | return Changes::new(); |
||
| 25 | } |
||
| 26 | |||
| 27 | return Changes::fromArray([ |
||
| 28 | Change::changed( |
||
| 29 | sprintf( |
||
| 30 | 'The number of required arguments for %s increased from %d to %d', |
||
| 31 | $this->functionOrMethodName($fromFunction), |
||
| 32 | $fromRequiredParameters, |
||
| 33 | $toRequiredParameters |
||
| 34 | ), |
||
| 35 | true |
||
| 36 | ), |
||
| 51 |