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.
Passed
Push — master ( 956770...dab675 )
by Matthew
03:36 queued 22s
created

StdEnv::multiply()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 2
dl 0
loc 6
ccs 4
cts 4
cp 1
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Sphpeme\Env;
4
5
6
class StdEnv implements EnvInterface
7
{
8
    use MappedEnvTrait;
9
10
    const MAPPING = [
11
        'list' => '_list'
12
    ];
13
14
15 1
    public function _list(...$args)
16
    {
17 1
        return $args;
18
    }
19
20 1
    public function car(array $list)
21
    {
22 1
        return current($list);
23
    }
24
25 1
    public function cdr(array $list)
26
    {
27 1
        return \array_slice($list, 1);
28
    }
29
30 1
    public function display($arg)
31
    {
32 1
        if (is_scalar($arg) || method_exists($arg, '__toString')) {
33 1
            echo $arg;
34
        } else {
35 1
            var_export($arg);
36
        }
37 1
    }
38
39 1
    public function newline()
40
    {
41 1
        echo PHP_EOL;
42 1
    }
43
}
44