| Total Complexity | 4 |
| Total Lines | 61 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | final class CallContextMethodOnFailure implements TransitionCallback |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | private $to; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | private $method; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var array |
||
| 23 | */ |
||
| 24 | private $args; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param string $to |
||
| 28 | * @param string $method |
||
| 29 | * @param array $args |
||
| 30 | */ |
||
| 31 | 1 | public function __construct( |
|
| 32 | $to, |
||
| 33 | $method, |
||
| 34 | array $args |
||
| 35 | ) { |
||
| 36 | 1 | $this->to = $to; |
|
| 37 | 1 | $this->method = $method; |
|
| 38 | 1 | $this->args = $args; |
|
| 39 | 1 | } |
|
| 40 | |||
| 41 | /** |
||
| 42 | * @param mixed $context |
||
| 43 | * @param StateMachine $machine |
||
| 44 | */ |
||
| 45 | 1 | public function beforeStateChange($context, StateMachine $machine) |
|
| 46 | { |
||
| 47 | 1 | } |
|
| 48 | |||
| 49 | /** |
||
| 50 | * @param mixed $context |
||
| 51 | * @param StateMachine $machine |
||
| 52 | */ |
||
| 53 | 1 | public function afterStateChange($context, StateMachine $machine) |
|
| 55 | 1 | } |
|
| 56 | |||
| 57 | /** |
||
| 58 | * @param InvalidStateTransitionException $exception |
||
| 59 | * @param mixed $context |
||
| 60 | * @param StateMachine $machine |
||
| 61 | * |
||
| 62 | * @return string |
||
| 63 | */ |
||
| 64 | 1 | public function onFailure(InvalidStateTransitionException $exception, $context, StateMachine $machine) |
|
| 72 |