ShortNameResolver   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 9
rs 10
c 1
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A resolve() 0 7 2
1
<?php
2
3
namespace SilverLeague\IDEAnnotator\Reflection;
4
5
use phpDocumentor\Reflection\Fqsen;
6
use phpDocumentor\Reflection\FqsenResolver;
7
use phpDocumentor\Reflection\Types\Context;
8
9
class ShortNameResolver extends FqsenResolver
10
{
11
    public function resolve(string $fqsen, ?Context $context = null): Fqsen
12
    {
13
        if ($context === null) {
14
            $context = new Context('');
0 ignored issues
show
Unused Code introduced by
The assignment to $context is dead and can be removed.
Loading history...
15
        }
16
17
        return new Fqsen($fqsen);
18
    }
19
}
20