Passed
Pull Request — master (#3407)
by Antoine
03:51
created

Components   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 68
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 28
c 1
b 0
f 0
dl 0
loc 68
rs 10
wmc 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
A getCallbacks() 0 3 1
A getExamples() 0 3 1
A getHeaders() 0 3 1
A getRequestBodies() 0 3 1
A getSchemas() 0 3 1
A getResponses() 0 3 1
A getSecuritySchemes() 0 3 1
A getParameters() 0 3 1
A getLinks() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace ApiPlatform\Core\OpenApi;
15
16
class Components
17
{
18
    private $schemas;
19
    private $responses;
20
    private $parameters;
21
    private $examples;
22
    private $requestBodies;
23
    private $headers;
24
    private $securitySchemes;
25
    private $links;
26
    private $callbacks;
27
28
    public function __construct(array $schemas = [], array $responses = [], array $parameters = [], array $examples = [], array $requestBodies = [], array $headers = [], array $securitySchemes = [], array $links = [], array $callbacks = [])
29
    {
30
        $this->schemas = $schemas;
31
        $this->responses = $responses;
32
        $this->parameters = $parameters;
33
        $this->examples = $examples;
34
        $this->requestBodies = $requestBodies;
35
        $this->headers = $headers;
36
        $this->securitySchemes = $securitySchemes;
37
        $this->links = $links;
38
        $this->callbacks = $callbacks;
39
    }
40
41
    public function getSchemas()
42
    {
43
        return $this->schemas;
44
    }
45
46
    public function getResponses()
47
    {
48
        return $this->responses;
49
    }
50
51
    public function getParameters()
52
    {
53
        return $this->parameters;
54
    }
55
56
    public function getExamples()
57
    {
58
        return $this->examples;
59
    }
60
61
    public function getRequestBodies()
62
    {
63
        return $this->requestBodies;
64
    }
65
66
    public function getHeaders()
67
    {
68
        return $this->headers;
69
    }
70
71
    public function getSecuritySchemes()
72
    {
73
        return $this->securitySchemes;
74
    }
75
76
    public function getLinks()
77
    {
78
        return $this->links;
79
    }
80
81
    public function getCallbacks()
82
    {
83
        return $this->callbacks;
84
    }
85
}
86