PhpDocType::renderArgumentType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Swaggest\PhpCodeBuilder;
4
5
6
class PhpDocType implements PhpAnyType
7
{
8
    private $type;
9
10
    /**
11
     * @return string
12
     */
13
    public function renderArgumentType()
14
    {
15
        return '';
16
    }
17
18
    /**
19
     * @return string
20
     */
21 11
    public function renderPhpDocType()
22
    {
23 11
        return $this->type;
24
    }
25
26 6
    private function __construct($type)
27
    {
28 6
        $this->type = $type;
29 6
    }
30
31 1
    public static function staticType()
32
    {
33 1
        return new self('static');
34
    }
35
36
    public static function selfType()
37
    {
38
        return new self('self');
39
    }
40
41 5
    public static function thisType()
42
    {
43 5
        return new self('$this');
44
    }
45
46
}