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 — master ( b4b6cb...9f2353 )
by SignpostMarv
05:37
created

__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 8

Duplication

Lines 16
Ratio 100 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 0
Metric Value
dl 16
loc 16
c 0
b 0
f 0
ccs 9
cts 9
cp 1
rs 9.4285
cc 1
eloc 8
nc 1
nop 5
crap 1
1
<?php
2
/**
3
* Exceptions.
4
*
5
* @author SignpostMarv
6
*/
7
declare(strict_types=1);
8
9
namespace SignpostMarv\DaftObject;
10
11
use Exception;
12
use Throwable;
13
14
/**
15
* Error thrown when a property is not thingable.
16
*/
17 View Code Duplication
abstract class AbstractPropertyNotThingableException extends Exception
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
18
{
19
    /**
20
    * Wraps to Exception::__construct().
21
    *
22
    * @param string $thing the type of thing that the $property cannot do, i.e. writeable, nullable
23
    * @param string $className name of the class on which the property is not thingable
24
    * @param string $property name of the property which is not thingable
25
    * @param int $code @see Exception::__construct()
26
    * @param Throwable|null $previous @see Exception::__construct()
27
    */
28 5
    public function __construct(
29
        string $thing,
30
        string $className,
31
        string $property,
32
        int $code = 0,
33
        Throwable $previous = null
34
    ) {
35 5
        parent::__construct(
36 5
            sprintf(
37 5
                'Property not %s: %s::$%s',
38 5
                $thing,
39 5
                $className,
40 5
                $property
41
            ),
42 5
            $code,
43 5
            $previous
44
        );
45 5
    }
46
}
47