| Conditions | 3 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | 5 | public function create(ReceiverFactory $factory, ReceiverInterface $receiver, ...$arguments): ReceiverInterface |
|
| 18 | { |
||
| 19 | 5 | if (!isset($arguments[0]) || !($arguments[0] instanceof ServicesResetter)) { |
|
| 20 | 1 | throw new \LogicException( |
|
| 21 | 1 | sprintf('First argument of %s should be an instance of %s.', ResetServices::class, ServicesResetter::class) |
|
| 22 | ); |
||
| 23 | } |
||
| 24 | |||
| 25 | 4 | return new ResetServices($receiver, $arguments[0]); |
|
| 26 | } |
||
| 28 |