Passed
Branch 3.3 (35580f)
by Pieter
15:26
created

SubAction   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 80
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 16
c 1
b 0
f 1
dl 0
loc 80
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getObject() 0 3 1
A getName() 0 3 1
A getArguments() 0 3 1
A getReflectionMethod() 0 3 1
A getReturnTypehint() 0 3 1
A __construct() 0 6 1
1
<?php
2
3
namespace W2w\Lib\Apie\OpenApiSchema\SubActions;
4
5
use ReflectionMethod;
6
use Symfony\Component\PropertyInfo\Type;
7
8
class SubAction
9
{
10
    /**
11
     * @var string
12
     */
13
    private $name;
14
15
    /**
16
     * @var (Type|null)[]
17
     */
18
    private $arguments;
19
20
    /**
21
     * @var Type|null
22
     */
23
    private $returnTypehint;
24
25
    /**
26
     * @var ReflectionMethod
27
     */
28
    private $reflectionMethod;
29
30
    /**
31
     * @var object|null
32
     */
33
    private $object;
34
35
    /**
36
     * @param string $name
37
     * @param (Type|null)[] $arguments
38
     * @param ReflectionMethod $reflectionMethod
39
     * @param Type|null $returnTypehint
40
     * @param object|null $object
41
     */
42
    public function __construct(string $name, array $arguments, ReflectionMethod $reflectionMethod, ?Type $returnTypehint, ?object $object) {
43
        $this->name = $name;
44
        $this->arguments = $arguments;
45
        $this->reflectionMethod = $reflectionMethod;
46
        $this->returnTypehint = $returnTypehint;
47
        $this->object = $object;
48
    }
49
50
    /**
51
     * @return string
52
     */
53
    public function getName(): string
54
    {
55
        return $this->name;
56
    }
57
58
    /**
59
     * @return Type[]
60
     */
61
    public function getArguments(): array
62
    {
63
        return $this->arguments;
64
    }
65
66
    /**
67
     * @return Type|null
68
     */
69
    public function getReturnTypehint(): ?Type
70
    {
71
        return $this->returnTypehint;
72
    }
73
74
    /**
75
     * @return ReflectionMethod
76
     */
77
    public function getReflectionMethod(): ReflectionMethod
78
    {
79
        return $this->reflectionMethod;
80
    }
81
82
    /**
83
     * @return object|null
84
     */
85
    public function getObject(): ?object
86
    {
87
        return $this->object;
88
    }
89
}
90