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.

StdEnv::display()   A
last analyzed

Complexity

Conditions 3
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 3

Importance

Changes 0
Metric Value
cc 3
nc 2
nop 1
dl 0
loc 8
ccs 5
cts 5
cp 1
crap 3
rs 10
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