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

Context::getDefinition()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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