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 | final class NullCallback implements 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 | 1 | public function beforeStateChange($context, StateMachine $machine): void |
|
0 ignored issues
–
show
|
|||
15 | { |
||
0 ignored issues
–
show
|
|||
16 | 1 | } |
|
0 ignored issues
–
show
|
|||
17 | |||
18 | /** |
||
0 ignored issues
–
show
|
|||
19 | * @param mixed $context |
||
0 ignored issues
–
show
|
|||
20 | * @param StateMachine $machine |
||
0 ignored issues
–
show
|
|||
21 | */ |
||
0 ignored issues
–
show
|
|||
22 | public function afterStateChange($context, StateMachine $machine): void |
||
23 | { |
||
0 ignored issues
–
show
|
|||
24 | } |
||
0 ignored issues
–
show
|
|||
25 | |||
26 | /** |
||
0 ignored issues
–
show
|
|||
27 | * @param InvalidStateTransitionException $exception |
||
0 ignored issues
–
show
|
|||
28 | * @param mixed $context |
||
0 ignored issues
–
show
|
|||
29 | * @param StateMachine $machine |
||
0 ignored issues
–
show
|
|||
30 | * |
||
31 | * @return string |
||
0 ignored issues
–
show
|
|||
32 | */ |
||
0 ignored issues
–
show
|
|||
33 | 1 | public function onFailure(InvalidStateTransitionException $exception, $context, StateMachine $machine): string |
|
34 | { |
||
0 ignored issues
–
show
|
|||
35 | 1 | throw new \RuntimeException('Method ' . __METHOD__ . ' should never be called.'); |
|
0 ignored issues
–
show
|
|||
36 | } |
||
0 ignored issues
–
show
|
|||
37 | } |
||
0 ignored issues
–
show
|
|||
38 |