Completed
Push — master ( 8bbcd1...4bee86 )
by Denis
04:24
created

GeneralMapper   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
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getClassAndMethod() 0 6 1
1
<?php
2
3
namespace PhpJsonRpc\Server;
4
5
class GeneralMapper 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