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::check()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 1
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
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