GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

GotoDetector   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A check() 0 6 2
1
<?php
2
3
namespace Inspector\Analysis\Checker\BadPractice;
4
5
use PhpParser\Node;
6
use PhpParser\Node\Stmt\Goto_;
7
use Inspector\Analysis\Checker\CheckerInterface;
8
use Inspector\Analysis\Exception\GotoDetectedException;
9
10
/**
11
 * Detects the use of die() or exit() from the code
12
 */
13
class GotoDetector implements CheckerInterface
14
{
15
16
    /**
17
     * @param Node $node
18
     * @throws GotoDetectedException
19
     */
20
    public function check(Node $node)
21
    {
22
        if ($node instanceof Goto_) {
23
            throw (new GotoDetectedException())->setNode($node);
24
        }
25
    }
26
}
27