Passed
Push — master ( 056350...65484c )
by Satoshi
05:02
created

UnknownReflectionClass   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A __construct() 0 9 2
1
<?php
2
declare(strict_types=1);
3
4
namespace DependencyAnalyzer\DependencyGraphBuilder;
5
6
/**
7
 * @canOnlyUsedBy \DependencyAnalyzer\DependencyGraphBuilder
8
 */
9
class UnknownReflectionClass extends \ReflectionClass
10
{
11
    protected $unknownClassName;
12
13
    public function __construct(string $name)
14
    {
15
        try {
16
            parent::__construct('');
17
        } catch (\ReflectionException $e) {
18
            //
19
        }
20
21
        $this->unknownClassName = $name;
22
    }
23
24
    public function getName()
25
    {
26
        return $this->unknownClassName;
27
    }
28
}
29