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

Mapper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getClassAndMethod() 0 6 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