Test Setup Failed
Push — main ( e03535...dde247 )
by Pieter
03:39
created

Document::getPaths()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
4
namespace Apie\OpenapiSchema\Spec;
5
6
use Apie\OpenapiSchema\Concerns\CompositeValueObjectWithExtension;
7
use Apie\OpenapiSchema\Contract\InfoContract;
8
use Apie\OpenapiSchema\Map\SecurityRequirementList;
9
use Apie\OpenapiSchema\Map\ServerList;
10
use Apie\OpenapiSchema\Map\TagList;
11
use Apie\OpenapiSchema\ValueObjects\OpenApiVersion;
12
use Apie\ValueObjects\ValueObjectInterface;
13
14
/**
15
 * @see https://swagger.io/specification/#openapi-object
16
 */
17
final class Document implements ValueObjectInterface
18
{
19
    use CompositeValueObjectWithExtension;
0 ignored issues
show
Bug introduced by
The trait Apie\OpenapiSchema\Conce...alueObjectWithExtension requires the property $name which is not provided by Apie\OpenapiSchema\Spec\Document.
Loading history...
20
21
    /**
22
     * @var OpenApiVersion
23
     */
24
    private $openapi;
25
26
    /**
27
     * @var InfoContract|Info
28
     */
29
    private $info;
30
31
    /**
32
     * @var ServerList|null
33
     */
34
    private $servers;
0 ignored issues
show
introduced by
The private property $servers is not used, and could be removed.
Loading history...
35
36
    /**
37
     * @var Paths
38
     */
39
    private $paths;
40
41
    /**
42
     * @var Components|null
43
     */
44
    private $components;
45
46
    /**
47
     * @var SecurityRequirementList|null
48
     */
49
    private $security;
0 ignored issues
show
introduced by
The private property $security is not used, and could be removed.
Loading history...
50
51
    /**
52
     * @var TagList|null
53
     */
54
    private $tags;
0 ignored issues
show
introduced by
The private property $tags is not used, and could be removed.
Loading history...
55
56
    /**
57
     * @var ExternalDocs|null
58
     */
59
    private $externalDocs;
0 ignored issues
show
introduced by
The private property $externalDocs is not used, and could be removed.
Loading history...
60
61
    public function __construct(InfoContract $info, Paths $paths)
62
    {
63
        $this->openapi = new OpenApiVersion('');
64
        $this->info = $info;
65
        $this->paths = $paths;
66
    }
67
68
    /**
69
     * @return Paths
70
     */
71
    public function getPaths(): Paths
72
    {
73
        return $this->paths;
74
    }
75
76
    /**
77
     * @return Components|null
78
     */
79
    public function getComponents(): ?Components
80
    {
81
        return $this->components;
82
    }
83
}
84