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.
Completed
Push — develop ( 870d79...a1e45f )
by Baptiste
05:29
created

ElementNotFound   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 24
c 1
b 0
f 0
dl 0
loc 36
ccs 23
cts 23
cp 1
rs 10
wmc 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B __construct() 0 31 10
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\Immutable\Exception;
5
6
class ElementNotFound extends InvalidArgumentException implements Exception
7
{
8
    /**
9
     * @param mixed $value
10
     */
11 6
    public function __construct($value)
12
    {
13 6
        switch (\gettype($value)) {
14 6
            case 'object':
15 2
                $class = \get_class($value);
16 2
                $id = \spl_object_id($value);
17 2
                $message = "object($class)#$id";
18 2
                break;
19
20 5
            case 'int':
21 5
            case 'integer':
22 1
            case 'float':
23 1
            case 'string':
24 1
            case 'double':
25 5
                $message = (string) $value;
26 5
                break;
27
28 1
            case 'NULL':
29 1
                $message = 'null';
30 1
                break;
31
32 1
            case 'boolean':
33 1
                $message = $value ? 'true' : 'false';
34 1
                break;
35
36
            default:
37 1
                $message = \gettype($value);
38 1
                break;
39
        }
40
41 6
        parent::__construct($message);
42 6
    }
43
}
44