Completed
Push — master ( 21563f...50178b )
by Denis
02:07
created

Mapper::getClassAndMethod()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace PhpJsonRpc\Server;
4
5
class Mapper implements MapperInterface
6
{
7
    /**
8
     * @inheritdoc
9
     */
10
    public function getClassAndMethod(string $requestedMethod): array
11
    {
12
        $chunks = explode('.', $requestedMethod);
13
        $class  = array_slice($chunks, 0, -1);
14
        return [implode('\\', $class), end($chunks)];
15
    }
16
}
17