| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function compare(ReflectionFunctionAbstract $fromFunction, ReflectionFunctionAbstract $toFunction) : Changes |
||
| 28 | { |
||
| 29 | $fromRequiredParameters = $fromFunction->getNumberOfRequiredParameters(); |
||
| 30 | $toRequiredParameters = $toFunction->getNumberOfRequiredParameters(); |
||
| 31 | |||
| 32 | if ($fromRequiredParameters >= $toRequiredParameters) { |
||
| 33 | return Changes::new(); |
||
| 34 | } |
||
| 35 | |||
| 36 | return Changes::fromArray([ |
||
| 37 | Change::changed( |
||
| 38 | sprintf( |
||
| 39 | 'The number of required arguments for %s increased from %d to %d', |
||
| 40 | $this->formatFunction->__invoke($fromFunction), |
||
| 41 | $fromRequiredParameters, |
||
| 42 | $toRequiredParameters |
||
| 43 | ), |
||
| 44 | true |
||
| 45 | ), |
||
| 49 |