ClassInfo::getServiceId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Saxulum\AnnotationManager\Helper;
4
5
class ClassInfo extends AbstractInfo
6
{
7
    /**
8
     * @var PropertyInfo[]
9
     */
10
    protected $propertyInfos;
11
12
    /**
13
     * @var MethodInfo[]
14
     */
15
    protected $methodInfos;
16
17
    /**
18
     * @param string         $name
19
     * @param array          $annotations
20
     * @param PropertyInfo[] $propertyInfos
21
     * @param MethodInfo[]   $methodInfos
22
     */
23
    public function __construct(
24
        $name,
25
        array $annotations = array(),
26
        array $propertyInfos = array(),
27
        array $methodInfos = array()
28
    ) {
29
        parent::__construct($name, $annotations);
30
31
        $this->propertyInfos = $propertyInfos;
32
        $this->methodInfos = $methodInfos;
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function getServiceId()
39
    {
40
        return str_replace('\\', '.', strtolower($this->getName()));
41
    }
42
43
    /**
44
     * @return PropertyInfo[]
45
     */
46
    public function getPropertyInfos()
47
    {
48
        return $this->propertyInfos;
49
    }
50
51
    /**
52
     * @return MethodInfo[]
53
     */
54
    public function getMethodInfos()
55
    {
56
        return $this->methodInfos;
57
    }
58
}
59