1 | <?php declare(strict_types=1); |
||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
2 | |||
3 | namespace Star\Component\State\Event; |
||
4 | |||
5 | use Symfony\Contracts\EventDispatcher\Event; |
||
6 | |||
7 | final class TransitionWasFailed extends Event implements StateEvent |
||
0 ignored issues
–
show
|
|||
8 | { |
||
0 ignored issues
–
show
|
|||
9 | /** |
||
0 ignored issues
–
show
|
|||
10 | * @var string |
||
11 | */ |
||
12 | private $transition; |
||
0 ignored issues
–
show
|
|||
13 | |||
14 | /** |
||
0 ignored issues
–
show
|
|||
15 | * @var \Throwable |
||
16 | */ |
||
17 | private $exception; |
||
0 ignored issues
–
show
|
|||
18 | |||
19 | 11 | public function __construct(string $transition, \Throwable $exception) |
|
0 ignored issues
–
show
|
|||
20 | { |
||
0 ignored issues
–
show
|
|||
21 | 11 | $this->transition = $transition; |
|
22 | 11 | $this->exception = $exception; |
|
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
23 | 11 | } |
|
0 ignored issues
–
show
|
|||
24 | |||
25 | public function transition(): string |
||
0 ignored issues
–
show
|
|||
26 | { |
||
0 ignored issues
–
show
|
|||
27 | return $this->transition; |
||
28 | } |
||
0 ignored issues
–
show
|
|||
29 | |||
30 | public function exception(): \Throwable |
||
0 ignored issues
–
show
|
|||
31 | { |
||
0 ignored issues
–
show
|
|||
32 | return $this->exception; |
||
33 | } |
||
0 ignored issues
–
show
|
|||
34 | } |
||
0 ignored issues
–
show
|
|||
35 |