Completed
Push — release/1.0.0 ( eaae36...93eb3c )
by Yo
07:15 queued 05:10
created

JsonRpcMethodNotFoundException::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 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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