• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

api-platform / core / 15133993414

20 May 2025 09:30AM UTC coverage: 26.313% (-1.2%) from 27.493%
15133993414

Pull #7161

github

web-flow
Merge e2c03d45f into 5459ba375
Pull Request #7161: fix(metadata): infer parameter string type from schema

0 of 2 new or added lines in 1 file covered. (0.0%)

11019 existing lines in 363 files now uncovered.

12898 of 49018 relevant lines covered (26.31%)

34.33 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

28.57
/src/OpenApi/Model/Components.php
1
<?php
2

3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <dunglas@gmail.com>
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\OpenApi\Model;
15

16
final class Components
17
{
18
    use ExtensionTrait;
19

20
    private ?\ArrayObject $schemas;
21

22
    /**
23
     * @param \ArrayObject<string, Schema>|\ArrayObject<string, Reference>                                 $schemas
24
     * @param \ArrayObject<string, Response>|\ArrayObject<string, Reference>                               $responses
25
     * @param \ArrayObject<string, Parameter>|\ArrayObject<string, Reference>                              $parameters
26
     * @param \ArrayObject<string, Example>|\ArrayObject<string, Reference>                                $examples
27
     * @param \ArrayObject<string, RequestBody>|\ArrayObject<string, Reference>                            $requestBodies
28
     * @param \ArrayObject<string, Header>|\ArrayObject<string, Reference>                                 $headers
29
     * @param \ArrayObject<string, SecurityScheme>|\ArrayObject<string, Reference>                         $headers
30
     * @param \ArrayObject<string, Link>|\ArrayObject<string, Reference>                                   $links
31
     * @param \ArrayObject<string, array<string, PathItem>>|\ArrayObject<string, array<string, Reference>> $callbacks
32
     * @param \ArrayObject<string, PathItem>|\ArrayObject<string, Reference>                               $pathItems
33
     */
34
    public function __construct(?\ArrayObject $schemas = null, private ?\ArrayObject $responses = null, private ?\ArrayObject $parameters = null, private ?\ArrayObject $examples = null, private ?\ArrayObject $requestBodies = null, private ?\ArrayObject $headers = null, private ?\ArrayObject $securitySchemes = null, private ?\ArrayObject $links = null, private ?\ArrayObject $callbacks = null, private ?\ArrayObject $pathItems = null)
35
    {
UNCOV
36
        $schemas?->ksort();
28✔
37

UNCOV
38
        $this->schemas = $schemas;
28✔
39
    }
40

41
    public function getSchemas(): ?\ArrayObject
42
    {
UNCOV
43
        return $this->schemas;
22✔
44
    }
45

46
    public function getResponses(): ?\ArrayObject
47
    {
UNCOV
48
        return $this->responses;
22✔
49
    }
50

51
    public function getParameters(): ?\ArrayObject
52
    {
UNCOV
53
        return $this->parameters;
22✔
54
    }
55

56
    public function getExamples(): ?\ArrayObject
57
    {
UNCOV
58
        return $this->examples;
22✔
59
    }
60

61
    public function getRequestBodies(): ?\ArrayObject
62
    {
UNCOV
63
        return $this->requestBodies;
22✔
64
    }
65

66
    public function getHeaders(): ?\ArrayObject
67
    {
UNCOV
68
        return $this->headers;
22✔
69
    }
70

71
    public function getSecuritySchemes(): ?\ArrayObject
72
    {
UNCOV
73
        return $this->securitySchemes;
22✔
74
    }
75

76
    public function getLinks(): ?\ArrayObject
77
    {
UNCOV
78
        return $this->links;
22✔
79
    }
80

81
    public function getCallbacks(): ?\ArrayObject
82
    {
UNCOV
83
        return $this->callbacks;
22✔
84
    }
85

86
    public function getPathItems(): ?\ArrayObject
87
    {
UNCOV
88
        return $this->pathItems;
22✔
89
    }
90

91
    public function withSchemas(\ArrayObject $schemas): self
92
    {
93
        $clone = clone $this;
×
94
        $clone->schemas = $schemas;
×
95

96
        return $clone;
×
97
    }
98

99
    public function withResponses(\ArrayObject $responses): self
100
    {
101
        $clone = clone $this;
×
102
        $clone->responses = $responses;
×
103

104
        return $clone;
×
105
    }
106

107
    public function withParameters(\ArrayObject $parameters): self
108
    {
109
        $clone = clone $this;
×
110
        $clone->parameters = $parameters;
×
111

112
        return $clone;
×
113
    }
114

115
    public function withExamples(\ArrayObject $examples): self
116
    {
117
        $clone = clone $this;
×
118
        $clone->examples = $examples;
×
119

120
        return $clone;
×
121
    }
122

123
    public function withRequestBodies(\ArrayObject $requestBodies): self
124
    {
125
        $clone = clone $this;
×
126
        $clone->requestBodies = $requestBodies;
×
127

128
        return $clone;
×
129
    }
130

131
    public function withHeaders(\ArrayObject $headers): self
132
    {
133
        $clone = clone $this;
×
134
        $clone->headers = $headers;
×
135

136
        return $clone;
×
137
    }
138

139
    public function withSecuritySchemes(\ArrayObject $securitySchemes): self
140
    {
141
        $clone = clone $this;
×
142
        $clone->securitySchemes = $securitySchemes;
×
143

144
        return $clone;
×
145
    }
146

147
    public function withLinks(\ArrayObject $links): self
148
    {
149
        $clone = clone $this;
×
150
        $clone->links = $links;
×
151

152
        return $clone;
×
153
    }
154

155
    public function withCallbacks(\ArrayObject $callbacks): self
156
    {
157
        $clone = clone $this;
×
158
        $clone->callbacks = $callbacks;
×
159

160
        return $clone;
×
161
    }
162

163
    public function withPathItems(\ArrayObject $pathItems): self
164
    {
165
        $clone = clone $this;
×
166
        $clone->pathItems = $pathItems;
×
167

168
        return $clone;
×
169
    }
170
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc