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.

ScalarHandler::evaluate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 3
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Sphpeme\ExpHandler;
4
5
6
use Sphpeme\Env\EnvInterface;
7
use Sphpeme\Evaluator;
8
use Sphpeme\Scalar;
9
10
class ScalarHandler implements ExpHandler
11
{
12
    /**
13
     * @param Scalar $exp
14
     * @param EnvInterface $env
15
     * @param Evaluator $evaluate
16
     * @return mixed
17
     */
18 2
    public function evaluate($exp, EnvInterface $env, Evaluator $evaluate)
19
    {
20 2
        return $exp->getValue();
21
    }
22
23 2
    public function handles($exp): bool
24
    {
25 2
        return $exp instanceof Scalar;
26
    }
27
}