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   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
eloc 8
dl 0
loc 18
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A ThrowIfNotType() 0 13 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