Passed
Push — feature/behat ( 6bdb7f...163f9f )
by Yo
02:10
created

JsonRpcMethodNotFoundException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 23
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getMethodName() 0 3 1
A __construct() 0 5 1
1
<?php
2
namespace Yoanm\JsonRpcServer\Domain\Exception;
3
4
/**
5
 * Class JsonRpcMethodNotFoundException
6
 */
7
class JsonRpcMethodNotFoundException extends JsonRpcException
8
{
9
    const CODE = -32601;
10
11
    /** @var string */
12
    private $methodName;
13
14
    /**
15
     * @param string $methodName
16
     */
17 2
    public function __construct(string $methodName)
18
    {
19 2
        $this->methodName = $methodName;
20
21 2
        parent::__construct(self::CODE, 'Method not found');
22 2
    }
23
24
    /**
25
     * @return string
26
     */
27 1
    public function getMethodName()
28
    {
29 1
        return $this->methodName;
30
    }
31
}
32