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 ( 0eff85...c54964 )
by SignpostMarv
04:19
created

TraitThrowIfNotType::ThrowIfNotType()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 13
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 3

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 13
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
cc 3
nc 2
nop 4
crap 3
1
<?php
2
/**
3
* Base daft objects.
4
*
5
* @author SignpostMarv
6
*/
7
declare(strict_types=1);
8
9
namespace SignpostMarv\DaftObject;
10
11
trait TraitThrowIfNotType
12
{
13
    /**
14
    * @param DaftObject|string $object
15
    */
16 18
    protected static function ThrowIfNotType(
17
        $object,
18
        string $type,
19
        int $argument,
20
        string $function
21
    ) : void {
22 18
        if (false === is_a($object, $type, is_string($object))) {
23 12
            throw new DaftObjectRepositoryTypeByClassMethodAndTypeException(
24 12
                $argument,
25 12
                static::class,
26 12
                $function,
27 12
                $type,
28 12
                is_string($object) ? $object : get_class($object)
29
            );
30
        }
31 14
    }
32
}
33