Passed
Push — master ( 9ee3f4...64b525 )
by Carlos C
01:09
created

BadMethodCallException::getMethodName()   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 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Eclipxe\MicroCatalog\Exceptions;
6
7
use BadMethodCallException as PhpBadMethodCallException;
8
9
class BadMethodCallException extends PhpBadMethodCallException implements MicroCatalogException
10
{
11
    /** @var string */
12
    private $className;
13
14
    /** @var string */
15
    private $methodName;
16
17 4
    public function __construct(string $className, string $methodName)
18
    {
19 4
        parent::__construct(sprintf('Call to undefined method %s::%s', $className, $methodName));
20 4
        $this->className = $className;
21 4
        $this->methodName = $methodName;
22 4
    }
23
24 1
    public function getClassName(): string
25
    {
26 1
        return $this->className;
27
    }
28
29 1
    public function getMethodName(): string
30
    {
31 1
        return $this->methodName;
32
    }
33
}
34