Completed
Push — master ( 3f1d1d...0341ae )
by Matze
05:15
created

ServiceIdGenerator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 15
ccs 3
cts 4
cp 0.75
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A generate() 0 8 2
1
<?php
2
3
namespace BrainExe\Core\Annotations;
4
5
class ServiceIdGenerator
6
{
7
    /**
8
     * @param string $className
9
     * @return string
10
     */
11 1
    public function generate(string $className) : string
12
    {
13 1
        if (false !== ($pos = strrpos($className, '\\'))) {
14 1
            return substr($className, $pos + 1);
15
        }
16
17
        return $className;
18
    }
19
}
20