Passed
Push — master ( 743cc2...6ffec3 )
by Oleg
02:50
created

NamingTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 10
c 0
b 0
f 0
ccs 3
cts 3
cp 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getBaseName() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace SlayerBirden\DFCodeGeneration\Generator;
5
6
use Zend\Code\Reflection\ClassReflection;
7
8
trait NamingTrait
9
{
10
    /**
11
     * @param string $entityClassName
12
     * @return string
13
     * @throws \ReflectionException
14
     */
15 9
    protected function getBaseName(string $entityClassName): string
16
    {
17 9
        $reflection = new ClassReflection($entityClassName);
18 9
        return $reflection->getShortName();
19
    }
20
}
21