yvoyer /
php-state
| 1 | <?php declare(strict_types=1); |
||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 2 | |||
| 3 | namespace Star\Component\State\Transitions; |
||
| 4 | |||
| 5 | use Star\Component\State\RegistryBuilder; |
||
| 6 | use Star\Component\State\StateTransition; |
||
| 7 | |||
| 8 | final class ReadOnlyTransition implements StateTransition |
||
|
0 ignored issues
–
show
|
|||
| 9 | { |
||
|
0 ignored issues
–
show
|
|||
| 10 | /** |
||
|
0 ignored issues
–
show
|
|||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | private $destination; |
||
|
0 ignored issues
–
show
|
|||
| 14 | |||
| 15 | 30 | public function __construct(string $destination) |
|
|
0 ignored issues
–
show
|
|||
| 16 | { |
||
|
0 ignored issues
–
show
|
|||
| 17 | 30 | $this->destination = $destination; |
|
| 18 | 30 | } |
|
|
0 ignored issues
–
show
|
|||
| 19 | |||
| 20 | public function getName(): string |
||
|
0 ignored issues
–
show
|
|||
| 21 | { |
||
|
0 ignored issues
–
show
|
|||
| 22 | throw new \RuntimeException('Method ' . __METHOD__ . ' not implemented yet.'); |
||
|
0 ignored issues
–
show
|
|||
| 23 | } |
||
|
0 ignored issues
–
show
|
|||
| 24 | |||
| 25 | public function onRegister(RegistryBuilder $registry): void |
||
|
0 ignored issues
–
show
|
|||
| 26 | { |
||
|
0 ignored issues
–
show
|
|||
| 27 | throw new \RuntimeException('Method ' . __METHOD__ . ' not implemented yet.'); |
||
|
0 ignored issues
–
show
|
|||
| 28 | } |
||
|
0 ignored issues
–
show
|
|||
| 29 | |||
| 30 | 29 | public function getDestinationState(): string |
|
|
0 ignored issues
–
show
|
|||
| 31 | { |
||
|
0 ignored issues
–
show
|
|||
| 32 | 29 | return $this->destination; |
|
| 33 | } |
||
|
0 ignored issues
–
show
|
|||
| 34 | } |
||
|
0 ignored issues
–
show
|
|||
| 35 |