Completed
Push — master ( ad3b69...02c092 )
by John
09:08 queued 05:48
created

RequestMeta::getOperation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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\EventListener\Request;
10
11
use KleijnWeb\PhpApi\Descriptions\Description\Description;
12
use KleijnWeb\PhpApi\Descriptions\Description\Operation;
13
14
/**
15
 * @author John Kleijn <[email protected]>
16
 */
17
class RequestMeta
18
{
19
    const ATTRIBUTE = '_swagger.meta';
20
    const ATTRIBUTE_URI = '_swagger.uri';
21
    const ATTRIBUTE_PATH = '_swagger.path';
22
23
    /**
24
     * @var Description
25
     */
26
    private $description;
27
28
    /**
29
     * @var Operation
30
     */
31
    private $operation;
32
33
    /**
34
     * RequestMeta constructor.
35
     *
36
     * @param Description $description
37
     * @param Operation   $operation
38
     */
39
    public function __construct(Description $description, Operation $operation)
40
    {
41
        $this->description = $description;
42
        $this->operation   = $operation;
43
    }
44
45
    /**
46
     * @return Operation
47
     */
48
    public function getOperation(): Operation
49
    {
50
        return $this->operation;
51
    }
52
}
53