Completed
Push — master ( da1c4e...70745c )
by Jaap
06:01
created

CustomParam   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 29
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A create() 0 8 1
A render() 0 4 1
A __toString() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace phpDocumentor\Reflection\Assets;
6
7
use phpDocumentor\Reflection\DocBlock\Tag;
8
use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
9
use phpDocumentor\Reflection\FqsenResolver;
10
use phpDocumentor\Reflection\DocBlock\Tags\Factory\StaticMethod;
11
12
final class CustomParam implements Tag, StaticMethod
13
{
14
    public $myParam;
15
    public $fqsenResolver;
16
17
    public function getName() : string
18
    {
19
        return 'spy';
20
    }
21
22
    public static function create($body, FqsenResolver $fqsenResolver = null, ?string $myParam = null)
23
    {
24
        $tag = new self();
25
        $tag->fqsenResolver = $fqsenResolver;
26
        $tag->myParam = $myParam;
27
28
        return $tag;
29
    }
30
31
    public function render(?Formatter $formatter = null) : string
32
    {
33
        return $this->getName();
34
    }
35
36
    public function __toString() : string
37
    {
38
        return $this->getName();
39
    }
40
}
41