Passed
Push — fix-phpbench-ci ( 32b959 )
by Michael
03:04
created

AnnotationWithRequiredAttributes   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 7
dl 0
loc 35
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Doctrine\Tests\Annotations\Fixtures;
4
5
/**
6
 * @Annotation
7
 * @Target("ALL")
8
 * @Attributes({
9
      @Attribute("value",   required = true ,   type = "string"),
10
      @Attribute("annot",   required = true ,   type = "Doctrine\Tests\Annotations\Fixtures\AnnotationTargetAnnotation"),
11
   })
12
 */
13
final class AnnotationWithRequiredAttributes
14
{
15
16
    public final function __construct(array $data)
17
    {
18
        foreach ($data as $key => $value) {
19
            $this->$key = $value;
20
        }
21
    }
22
23
    /**
24
     * @var string
25
     */
26
    private $value;
27
28
    /**
29
     *
30
     * @var \Doctrine\Tests\Annotations\Fixtures\AnnotationTargetAnnotation
31
     */
32
    private $annot;
33
34
    /**
35
     * @return string
36
     */
37
    public function getValue()
38
    {
39
        return $this->value;
40
    }
41
42
    /**
43
     * @return \Doctrine\Tests\Annotations\Fixtures\AnnotationTargetAnnotation
44
     */
45
    public function getAnnot()
46
    {
47
        return $this->annot;
48
    }
49
50
}
51