1 | <?php declare(strict_types=1); |
||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
2 | |||
3 | namespace Star\Component\State\Callbacks; |
||
4 | |||
5 | use Star\Component\State\InvalidStateTransitionException; |
||
6 | use Star\Component\State\StateMachine; |
||
7 | |||
8 | interface TransitionCallback |
||
0 ignored issues
–
show
|
|||
9 | { |
||
0 ignored issues
–
show
|
|||
10 | /** |
||
0 ignored issues
–
show
|
|||
11 | * @param mixed $context |
||
0 ignored issues
–
show
|
|||
12 | * @param StateMachine $machine |
||
0 ignored issues
–
show
|
|||
13 | */ |
||
0 ignored issues
–
show
|
|||
14 | public function beforeStateChange($context, StateMachine $machine): void; |
||
0 ignored issues
–
show
|
|||
15 | |||
16 | /** |
||
0 ignored issues
–
show
|
|||
17 | * @param mixed $context |
||
0 ignored issues
–
show
|
|||
18 | * @param StateMachine $machine |
||
0 ignored issues
–
show
|
|||
19 | */ |
||
0 ignored issues
–
show
|
|||
20 | public function afterStateChange($context, StateMachine $machine): void; |
||
0 ignored issues
–
show
|
|||
21 | |||
22 | /** |
||
0 ignored issues
–
show
|
|||
23 | * @param InvalidStateTransitionException $exception |
||
0 ignored issues
–
show
|
|||
24 | * @param mixed $context |
||
0 ignored issues
–
show
|
|||
25 | * @param StateMachine $machine |
||
0 ignored issues
–
show
|
|||
26 | * |
||
27 | * @return string The new state to move to on failure |
||
28 | */ |
||
29 | public function onFailure(InvalidStateTransitionException $exception, $context, StateMachine $machine): string; |
||
0 ignored issues
–
show
|
|||
30 | } |
||
0 ignored issues
–
show
|
|||
31 |