Completed
Pull Request — master (#8)
by Jeremy
04:54
created

MissingProperty::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 9.4285
cc 1
eloc 4
nc 1
nop 2
crap 1
1
<?php
2
3
4
namespace Scientist\SideEffects;
5
6
7
class MissingProperty extends \RuntimeException
8
{
9
    /**
10
     * MissingProperty constructor.
11
     * @param string $instance
12
     * @param string $property
13
     */
14 2
    public function __construct($instance, $property)
15
    {
16 2
        parent::__construct(sprintf("%s does not implement property %s",
17 2
            get_class($instance),
18
            $property
19 2
            ));
20
    }
21
}