Completed
Push — master ( d154ad...604248 )
by Valentin
05:10
created

ReflectionClass_   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getShortName() 0 4 1
A getNamespaceName() 0 4 2
A getFullName() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Cycle\ORM\Promise\Declaration\Proxy;
5
6
final class ReflectionClass_ implements ClassInterface
7
{
8
    /** @var \ReflectionClass */
9
    private $reflection;
10
11
    public function __construct(\ReflectionClass $class)
12
    {
13
        $this->reflection = $class;
14
    }
15
16
    public function getShortName(): string
17
    {
18
        return $this->reflection->getShortName();
19
    }
20
21
    public function getNamespaceName(): ?string
22
    {
23
        return $this->reflection->inNamespace() ? $this->reflection->getNamespaceName() : null;
24
    }
25
26
    public function getFullName(): string
27
    {
28
        return $this->reflection->getName();
0 ignored issues
show
Bug introduced by
Consider using $this->reflection->name. There is an issue with getName() and APC-enabled PHP versions.
Loading history...
29
    }
30
}