Issues (1124)

src/Callbacks/TransitionCallback.php (27 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 "TransitionCallback.php" doesn't match the expected filename "transitioncallback.php"
Loading history...
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
Missing class doc comment
Loading history...
9
{
0 ignored issues
show
Opening brace should be on the same line as the declaration for interface TransitionCallback
Loading history...
10
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
11
     * @param mixed $context
0 ignored issues
show
Missing parameter comment
Loading history...
Expected 8 spaces after parameter type; 1 found
Loading history...
12
     * @param StateMachine $machine
0 ignored issues
show
Missing parameter comment
Loading history...
13
     */
0 ignored issues
show
Missing @return tag in function comment
Loading history...
14
    public function beforeStateChange($context, StateMachine $machine): void;
0 ignored issues
show
Expected 2 blank lines before function; 0 found
Loading history...
Expected 2 blank lines after function; 1 found
Loading history...
15
16
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
17
     * @param mixed $context
0 ignored issues
show
Missing parameter comment
Loading history...
Expected 8 spaces after parameter type; 1 found
Loading history...
18
     * @param StateMachine $machine
0 ignored issues
show
Missing parameter comment
Loading history...
19
     */
0 ignored issues
show
Missing @return tag in function comment
Loading history...
20
    public function afterStateChange($context, StateMachine $machine): void;
0 ignored issues
show
Expected 2 blank lines after function; 1 found
Loading history...
21
22
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
23
     * @param InvalidStateTransitionException $exception
0 ignored issues
show
Missing parameter comment
Loading history...
24
     * @param mixed $context
0 ignored issues
show
Missing parameter comment
Loading history...
Expected 27 spaces after parameter type; 1 found
Loading history...
25
     * @param StateMachine $machine
0 ignored issues
show
Missing parameter comment
Loading history...
Expected 20 spaces after parameter type; 1 found
Loading history...
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
Expected 2 blank lines after function; 0 found
Loading history...
30
}
0 ignored issues
show
Expected //end interface
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...
31