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   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 22
c 1
b 0
f 0
dl 0
loc 34
rs 10
wmc 8

1 Method

Rating   Name   Duplication   Size   Complexity  
B __construct() 0 29 8
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