Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
38 | public function apply(RequestConfiguration $configuration, ResourceInterface $resource) |
||
39 | { |
||
40 | if (!$configuration->hasStateMachine()) { |
||
41 | throw new \InvalidArgumentException('State machine must be configured to apply transition, check your routing.'); |
||
42 | } |
||
43 | |||
44 | $this->stateMachineFactory->get($resource, $configuration->getStateMachineGraph())->apply($configuration->getStateMachineTransition()); |
||
45 | } |
||
46 | } |
||
47 |