Completed
Push — master ( 27a5d2...ad3b69 )
by John
20s
created

RequestMeta   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getDefinitionMap() 0 4 1
A getSpecification() 0 4 1
A getOperation() 0 4 1
1
<?php declare(strict_types = 1);
2
/*
3
 * This file is part of the KleijnWeb\SwaggerBundle 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
9
namespace KleijnWeb\SwaggerBundle\Request;
10
11
use KleijnWeb\SwaggerBundle\Document\Specification;
12
use KleijnWeb\SwaggerBundle\Document\Specification\Operation;
13
use KleijnWeb\SwaggerBundle\Serialize\TypeResolver\SerializerTypeDefinitionMap;
14
15
/**
16
 * @author John Kleijn <[email protected]>
17
 */
18
class RequestMeta
19
{
20
    /**
21
     * @var SerializerTypeDefinitionMap
22
     */
23
    private $definitionMap;
24
25
    /**
26
     * @var Specification
27
     */
28
    private $specification;
29
30
    /**
31
     * @var Operation
32
     */
33
    private $operation;
34
35
    /**
36
     * RequestMeta constructor.
37
     *
38
     * @param Specification               $specification
39
     * @param Operation                   $operation
40
     * @param SerializerTypeDefinitionMap $definitionMap
41
     */
42
    public function __construct(
43
        Specification $specification,
44
        Operation $operation,
45
        SerializerTypeDefinitionMap $definitionMap = null
46
    ) {
47
        $this->definitionMap = $definitionMap;
48
        $this->specification = $specification;
49
        $this->operation     = $operation;
50
    }
51
52
    /**
53
     * @return SerializerTypeDefinitionMap|null
54
     */
55
    public function getDefinitionMap()
56
    {
57
        return $this->definitionMap;
58
    }
59
60
    /**
61
     * @return Specification
62
     */
63
    public function getSpecification(): Specification
64
    {
65
        return $this->specification;
66
    }
67
68
    /**
69
     * @return Operation
70
     */
71
    public function getOperation(): Operation
72
    {
73
        return $this->operation;
74
    }
75
}
76