NotFoundException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A stateNotFound() 0 3 1
A transitionNotFound() 0 3 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 "NotFoundException.php" doesn't match the expected filename "notfoundexception.php"
Loading history...
2
/**
0 ignored issues
show
Coding Style introduced by
Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
Loading history...
Coding Style introduced by
Block comments must be started with /*
Loading history...
3
 * This file is part of the php-state project.
4
 *
5
 * (c) Yannick Voyer <[email protected]> (http://github.com/yvoyer)
6
 */
0 ignored issues
show
Coding Style introduced by
PHP version not specified
Loading history...
Coding Style introduced by
Missing @category tag in file comment
Loading history...
Coding Style introduced by
Missing @package tag in file comment
Loading history...
Coding Style introduced by
Missing @author tag in file comment
Loading history...
Coding Style introduced by
Missing @license tag in file comment
Loading history...
Coding Style introduced by
Missing @link tag in file comment
Loading history...
7
8
namespace Star\Component\State;
9
10
final class NotFoundException extends \Exception
0 ignored issues
show
Coding Style Documentation introduced by
Missing class doc comment
Loading history...
11
{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration for class NotFoundException
Loading history...
12 1
    public static function stateNotFound(string $name): 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...
13
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
14 1
        return new self(\sprintf("The state '%s' could not be found.", $name));
15
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 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 stateNotFound()
Loading history...
16
17 2
    public static function transitionNotFound(string $name): self
0 ignored issues
show
Coding Style introduced by
Missing function doc comment
Loading history...
18
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
19 2
        return new self(sprintf("The transition '%s' could not be found.", $name));
20
    }
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 transitionNotFound()
Loading history...
21
}
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...
22