Test Failed
Push — master ( 3b7232...dbe410 )
by Kirill
02:20
created

AbstractDependentTypeInvocation::getParent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
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\Reflection\Invocation\Dependent;
11
12
use Railt\Reflection\Contracts\Invocation\Dependent\DependentTypeInvocation;
13
use Railt\Reflection\Contracts\Invocation\TypeInvocation;
14
use Railt\Reflection\Document;
15
use Railt\Reflection\Invocation\AbstractTypeInvocation;
16
17
/**
18
 * Class AbstractDependentTypeInvocation
19
 */
20
abstract class AbstractDependentTypeInvocation extends AbstractTypeInvocation implements DependentTypeInvocation
21
{
22
    /**
23
     * @var TypeInvocation
24
     */
25
    protected $parent;
26
27
    /**
28
     * AbstractDependentTypeInvocation constructor.
29
     * @param TypeInvocation $parent
30
     * @param Document $document
31
     * @param string $name
32
     */
33
    public function __construct(TypeInvocation $parent, Document $document, string $name)
34
    {
35
        $this->parent = $parent;
36
37
        parent::__construct($document, $name);
38
    }
39
40
    /**
41
     * @return TypeInvocation
42
     */
43
    public function getParentInvocation(): TypeInvocation
44
    {
45
        return $this->parent;
46
    }
47
}
48