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 ( fd060d...258593 )
by Baptiste
03:01 queued 10s
created

ElementNotFound::__construct()   B

Complexity

Conditions 8
Paths 8

Size

Total Lines 29
Code Lines 21

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 8
eloc 21
c 0
b 0
f 0
nc 8
nop 1
dl 0
loc 29
rs 8.4444
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
    public function __construct($value)
12
    {
13
        switch (\gettype($value)) {
14
            case 'object':
15
                $class = \get_class($value);
16
                $id = \spl_object_id($value);
17
                $message = "object($class)#$id";
18
                break;
19
20
            case 'integer':
21
            case 'string':
22
            case 'double':
23
                $message = (string) $value;
24
                break;
25
26
            case 'NULL':
27
                $message = 'null';
28
                break;
29
30
            case 'boolean':
31
                $message = $value ? 'true' : 'false';
32
                break;
33
34
            default:
35
                $message = \gettype($value);
36
                break;
37
        }
38
39
        parent::__construct($message);
40
    }
41
}
42