Test Failed
Push — master ( b7ab7b...94ee03 )
by Kirill
02:59
created

TypeInvocationPrimitive   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getName() 0 4 1
A getContext() 0 4 1
A __toString() 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\IR\SymbolTable;
11
12
use Railt\SDL\Frontend\Context\ContextInterface;
13
use Railt\SDL\IR\Type\TypeNameInterface;
14
15
/**
16
 * Class TypeInvocationPrimitive
17
 */
18
class TypeInvocationPrimitive implements PrimitiveInterface
19
{
20
    /**
21
     * @var TypeNameInterface
22
     */
23
    private $name;
24
25
    /**
26
     * @var ContextInterface
27
     */
28
    private $context;
29
30
    /**
31
     * TypeInvocation constructor.
32
     * @param TypeNameInterface $name
33
     * @param ContextInterface $context
34
     */
35
    public function __construct(TypeNameInterface $name, ContextInterface $context)
36
    {
37
        $this->name = $name;
38
        $this->context = $context;
39
    }
40
41
    /**
42
     * @return TypeNameInterface
43
     */
44
    public function getName(): TypeNameInterface
45
    {
46
        return $this->name;
47
    }
48
49
    /**
50
     * @return ContextInterface
51
     */
52
    public function getContext(): ContextInterface
53
    {
54
        return $this->context;
55
    }
56
57
    /**
58
     * @return string
59
     */
60
    public function __toString(): string
61
    {
62
        return $this->name->getFullyQualifiedName();
63
    }
64
}
65