Failed Conditions
Pull Request — master (#1)
by Yo
05:58 queued 03:23
created

JsonRpcMethodNotFoundException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 7
ccs 0
cts 6
cp 0
crap 2
rs 9.4285
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
    /**
12
     * @param string $methodName
13
     */
14
    public function __construct(string $methodName)
15
    {
16
        $data = [
17
            'method' => $methodName,
18
        ];
19
20
        parent::__construct(self::CODE, 'Method not found', $data);
21
    }
22
}
23