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

VariableType   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 11
ccs 4
cts 4
cp 1
rs 10
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 3
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\Immutable\ValidateArgument;
5
6
use Innmind\Immutable\{
7
    ValidateArgument,
8
    Type,
9
};
10
11
final class VariableType implements ValidateArgument
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16 4
    public function __invoke($value, int $position): void
17
    {
18 4
        if (!\is_scalar($value) && !\is_array($value)) {
19 1
            $given = Type::determine($value);
20
21 1
            throw new \TypeError("Argument $position must be of type variable, $given given");
22
        }
23 3
    }
24
}
25