| Conditions | 3 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 3 | public function handle(Patchable $subject, OperationData $operationData): void |
|
| 23 | { |
||
| 24 | 3 | $sm = $this->factoryInterface->get($subject); |
|
| 25 | 3 | $transition = $operationData->get('transition')->get(); |
|
| 26 | 3 | if ($operationData->get('check')->get() && !$sm->can($transition)) { |
|
| 27 | 1 | return; |
|
| 28 | } |
||
| 29 | 2 | $sm->apply($transition); |
|
| 30 | } |
||
| 61 |