GetClassNameFromFQCN   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 10
ccs 5
cts 5
cp 1
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 8 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Antidot\DevTools\Application\Service;
6
7
use function is_bool;
8
use function strrchr;
9
use function substr;
10
11
class GetClassNameFromFQCN
12
{
13 4
    public function __invoke(string $fqcn): string
14
    {
15 4
        $index = strrchr($fqcn, "\\");
16 4
        if (is_bool($index)) {
0 ignored issues
show
introduced by
The condition is_bool($index) is always false.
Loading history...
17 2
            return $fqcn;
18
        }
19
20 4
        return substr($index, 1);
21
    }
22
}
23