DuplicateEntryException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A duplicateTransition() 0 4 1
1
<?php declare(strict_types=1);
0 ignored issues
show
Coding Style introduced by
This file is missing a doc comment.
Loading history...
Coding Style introduced by
The PHP open tag does not have a corresponding PHP close tag
Loading history...
Coding Style introduced by
Filename "DuplicateEntryException.php" doesn't match the expected filename "duplicateentryexception.php"
Loading history...
2
3
namespace Star\Component\State;
4
5
final class DuplicateEntryException extends \LogicException
0 ignored issues
show
Coding Style Documentation introduced by
Missing class doc comment
Loading history...
6
{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration for class DuplicateEntryException
Loading history...
7 1
    public static function duplicateTransition(string $transition): self
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 0 found
Loading history...
Coding Style introduced by
Missing function doc comment
Loading history...
8
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
9 1
        return new self(
10 1
            \sprintf("The transition '%s' is already registered.", $transition)
11
        );
12
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end duplicateTransition()
Loading history...
13
}
0 ignored issues
show
Coding Style introduced by
Expected //end class
Loading history...
Coding Style introduced by
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...
14