Test Failed
Push — master ( 08b170...e6bc2a )
by Kirill
02:02
created

Context   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 47
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getDocument() 0 4 1
A getFile() 0 4 1
A getDefinition() 0 4 1
1
<?php
2
/**
3
 * This file is part of Railt package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
declare(strict_types=1);
9
10
namespace Railt\SDL\Builder;
11
12
use Railt\Io\Readable;
13
use Railt\Reflection\Contracts\Definition;
14
use Railt\Reflection\Contracts\Document;
15
16
/**
17
 * Class Context
18
 */
19
class Context
20
{
21
    /**
22
     * @var Readable
23
     */
24
    private $file;
25
26
    /**
27
     * @var Definition
28
     */
29
    private $definition;
30
31
    /**
32
     * Context constructor.
33
     * @param Readable $file
34
     * @param Definition $definition
35
     */
36
    public function __construct(Readable $file, Definition $definition)
37
    {
38
        $this->file = $file;
39
        $this->definition = $definition;
40
    }
41
42
    /**
43
     * @return Document
44
     */
45
    public function getDocument(): Document
46
    {
47
        return $this->definition->getDocument();
48
    }
49
50
    /**
51
     * @return Readable
52
     */
53
    public function getFile(): Readable
54
    {
55
        return $this->file;
56
    }
57
58
    /**
59
     * @return Definition
60
     */
61
    public function getDefinition(): Definition
62
    {
63
        return $this->definition;
64
    }
65
}
66