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

CustomParam::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
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