Passed
Branch release/v2.0.0 (52e4c5)
by Anatoly
05:40 queued 01:36
created

Operation::toArray()   A

Complexity

Conditions 4
Paths 8

Size

Total Lines 22
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 20

Importance

Changes 0
Metric Value
eloc 12
c 0
b 0
f 0
dl 0
loc 22
ccs 0
cts 18
cp 0
rs 9.8666
cc 4
nc 8
nop 0
crap 20
1
<?php declare(strict_types=1);
2
3
/**
4
 * It's free open-source software released under the MIT License.
5
 *
6
 * @author Anatoly Fenric <[email protected]>
7
 * @copyright Copyright (c) 2018, Anatoly Fenric
8
 * @license https://github.com/sunrise-php/http-router/blob/master/LICENSE
9
 * @link https://github.com/sunrise-php/http-router
10
 */
11
12
namespace Sunrise\Http\Router\Annotation\OpenApi;
13
14
/**
15
 * @Annotation
16
 *
17
 * @Target({"CLASS"})
18
 *
19
 * @link https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#operation-object
20
 */
21
final class Operation extends AbstractAnnotation
22
{
23
24
    /**
25
     * @var array<string>
26
     */
27
    public $tags;
28
29
    /**
30
     * @var string
31
     */
32
    public $summary;
33
34
    /**
35
     * @var string
36
     */
37
    public $description;
38
39
    /**
40
     * @var bool
41
     */
42
    public $deprecated;
43
44
    /**
45
     * @var array<\Sunrise\Http\Router\Annotation\OpenApi\ParameterInterface>
46
     */
47
    public $parameters;
48
49
    /**
50
     * @var \Sunrise\Http\Router\Annotation\OpenApi\RequestBodyInterface
51
     */
52
    public $requestBody;
53
54
    /**
55
     * @Required
56
     *
57
     * @var array<\Sunrise\Http\Router\Annotation\OpenApi\ResponseInterface>
58
     */
59
    public $responses;
60
}
61