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.

Code Duplication    Length = 21-21 lines in 3 locations

src/TwigJs/Compiler/Expression/Unary/NegCompiler.php 1 location

@@ 24-44 (lines=21) @@
21
use TwigJs\Compiler\Expression\UnaryCompiler;
22
use TwigJs\JsCompiler;
23
24
class NegCompiler extends UnaryCompiler
25
{
26
    public function getType()
27
    {
28
        return 'Twig_Node_Expression_Unary_Neg';
29
    }
30
31
    protected function operator(JsCompiler $compiler, \Twig_NodeInterface $node)
32
    {
33
        if (!$node instanceof \Twig_Node_Expression_Unary_Neg) {
34
            throw new \RuntimeException(
35
                sprintf(
36
                    '$node must be an instanceof of \Expression_Unary_Neg, but got "%s".',
37
                    get_class($node)
38
                )
39
            );
40
        }
41
42
        $compiler->raw('-');
43
    }
44
}
45

src/TwigJs/Compiler/Expression/Unary/NotCompiler.php 1 location

@@ 24-44 (lines=21) @@
21
use TwigJs\Compiler\Expression\UnaryCompiler;
22
use TwigJs\JsCompiler;
23
24
class NotCompiler extends UnaryCompiler
25
{
26
    public function getType()
27
    {
28
        return 'Twig_Node_Expression_Unary_Not';
29
    }
30
31
    protected function operator(JsCompiler $compiler, \Twig_NodeInterface $node)
32
    {
33
        if (!$node instanceof \Twig_Node_Expression_Unary_Not) {
34
            throw new \RuntimeException(
35
                sprintf(
36
                    '$node must be an instanceof of \Twig_Node_Expression_Unary_Not, but got "%s".',
37
                    get_class($node)
38
                )
39
            );
40
        }
41
42
        $compiler->raw('!');
43
    }
44
}
45

src/TwigJs/Compiler/Expression/Unary/PosCompiler.php 1 location

@@ 24-44 (lines=21) @@
21
use TwigJs\Compiler\Expression\UnaryCompiler;
22
use TwigJs\JsCompiler;
23
24
class PosCompiler extends UnaryCompiler
25
{
26
    public function getType()
27
    {
28
        return 'Twig_Node_Expression_Unary_Pos';
29
    }
30
31
    protected function operator(JsCompiler $compiler, \Twig_NodeInterface $node)
32
    {
33
        if (!$node instanceof \Twig_Node_Expression_Unary_Pos) {
34
            throw new \RuntimeException(
35
                sprintf(
36
                    '$node must be an instanceof of \Twig_Node_Expression_Unary_Pos, but got "%s".',
37
                    get_class($node)
38
                )
39
            );
40
        }
41
42
        $compiler->raw('+');
43
    }
44
}
45