PHPClassOf::__toString()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
namespace Goetas\Xsd\XsdToPhp\Php\Structure;
3
4
class PHPClassOf extends PHPClass
5
{
6
7
    /**
8
     * @var PHPArg
9
     */
10
    protected $arg;
11
12
    /**
13
     * @param PHPArg $arg
14
     */
15 9
    public function __construct(PHPArg $arg)
16
    {
17 9
        $this->arg = $arg;
18 9
        $this->name = 'array';
19 9
    }
20
21
    /**
22
     * @return string
23
     */
24
    public function __toString()
25
    {
26
        return "array of " . $this->arg;
27
    }
28
29
    /**
30
     * @return PHPArg
31
     */
32 6
    public function getArg()
33
    {
34 6
        return $this->arg;
35
    }
36
}
37
38