Issues (1124)

src/Event/TransitionWasFailed.php (31 issues)

1
<?php declare(strict_types=1);
0 ignored issues
show
This file is missing a doc comment.
Loading history...
The PHP open tag does not have a corresponding PHP close tag
Loading history...
Filename "TransitionWasFailed.php" doesn't match the expected filename "transitionwasfailed.php"
Loading history...
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
Coding Style Documentation introduced by
Missing class doc comment
Loading history...
8
{
0 ignored issues
show
Opening brace should be on the same line as the declaration for class TransitionWasFailed
Loading history...
9
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
10
     * @var string
11
     */
12
    private $transition;
0 ignored issues
show
Private member variable "transition" must contain a leading underscore
Loading history...
Expected 1 blank line before member var; 0 found
Loading history...
Private member variable "transition" must be prefixed with an underscore
Loading history...
13
14
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
15
     * @var \Throwable
16
     */
17
    private $exception;
0 ignored issues
show
Private member variable "exception" must contain a leading underscore
Loading history...
Private member variable "exception" must be prefixed with an underscore
Loading history...
18
19 11
    public function __construct(string $transition, \Throwable $exception)
0 ignored issues
show
Expected 2 blank lines before function; 1 found
Loading history...
Missing function doc comment
Loading history...
20
    {
0 ignored issues
show
Opening brace should be on the same line as the declaration
Loading history...
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.

Loading history...
23 11
    }
0 ignored issues
show
Expected 2 blank lines after function; 1 found
Loading history...
Expected 1 blank line before closing function brace; 0 found
Loading history...
Expected //end __construct()
Loading history...
24
25
    public function transition(): string
0 ignored issues
show
Missing function doc comment
Loading history...
26
    {
0 ignored issues
show
Opening brace should be on the same line as the declaration
Loading history...
27
        return $this->transition;
28
    }
0 ignored issues
show
Expected 2 blank lines after function; 1 found
Loading history...
Expected 1 blank line before closing function brace; 0 found
Loading history...
Expected //end transition()
Loading history...
29
30
    public function exception(): \Throwable
0 ignored issues
show
Missing function doc comment
Loading history...
31
    {
0 ignored issues
show
Opening brace should be on the same line as the declaration
Loading history...
32
        return $this->exception;
33
    }
0 ignored issues
show
Expected 2 blank lines after function; 0 found
Loading history...
Expected 1 blank line before closing function brace; 0 found
Loading history...
Expected //end exception()
Loading history...
34
}
0 ignored issues
show
Expected //end class
Loading history...
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
35