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

NullableType::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\Immutable\ValidateArgument;
5
6
use Innmind\Immutable\ValidateArgument;
7
8
final class NullableType implements ValidateArgument
9
{
10
    private $validate;
11
12 4
    public function __construct(ValidateArgument $validate)
13
    {
14 4
        $this->validate = $validate;
15 4
    }
16
17
    /**
18
     * {@inheritdoc}
19
     */
20 3
    public function __invoke($value, int $position): void
21
    {
22 3
        if (\is_null($value)) {
23 1
            return;
24
        }
25
26 2
        ($this->validate)($value, $position);
27 2
    }
28
}
29