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

BadMethodCallException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 23
ccs 9
cts 9
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getClassName() 0 3 1
A getMethodName() 0 3 1
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