Completed
Push — master ( 3c8585...bbfb28 )
by Hannes
05:06
created

Definition::getAnnotation()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 5
nc 3
nop 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace hanneskod\readmetester;
6
7
/**
8
 * Value object containing code and annotations defining an example
9
 */
10
class Definition
11
{
12
    /**
13
     * @var Annotation[]
14
     */
15
    private $annotations;
16
17
    /**
18
     * @var CodeBlock
19
     */
20
    private $code;
21
22
    public function __construct(CodeBlock $code, Annotation ...$annotations)
23
    {
24
        $this->code = $code;
25
        $this->annotations = $annotations;
26
    }
27
28
    public function getCodeBlock(): CodeBlock
29
    {
30
        return $this->code;
31
    }
32
33
    /**
34
     * @return Annotation[]
35
     */
36
    public function getAnnotations(): array
37
    {
38
        return $this->annotations;
39
    }
40
}
41