• 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

87.5
/src/OpenApi/Options.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;
15

16
use ApiPlatform\OpenApi\Model\Tag;
17

18
final readonly class Options
19
{
20
    /**
21
     * @param Tag[]        $tags
22
     * @param class-string $errorResourceClass
23
     * @param class-string $validationErrorResourceClass
24
     */
25
    public function __construct(
26
        private string $title,
27
        private string $description = '',
28
        private string $version = '',
29
        private bool $oAuthEnabled = false,
30
        private ?string $oAuthType = null,
31
        private ?string $oAuthFlow = null,
32
        private ?string $oAuthTokenUrl = null,
33
        private ?string $oAuthAuthorizationUrl = null,
34
        private ?string $oAuthRefreshUrl = null,
35
        private array $oAuthScopes = [],
36
        private array $apiKeys = [],
37
        private ?string $contactName = null,
38
        private ?string $contactUrl = null,
39
        private ?string $contactEmail = null,
40
        private ?string $termsOfService = null,
41
        private ?string $licenseName = null,
42
        private ?string $licenseUrl = null,
43
        private bool $overrideResponses = true,
44
        private bool $persistAuthorization = false,
45
        private array $httpAuth = [],
46
        private array $tags = [],
47
        private ?string $errorResourceClass = null,
48
        private ?string $validationErrorResourceClass = null,
49
    ) {
UNCOV
50
    }
809✔
51

52
    public function getTitle(): string
53
    {
UNCOV
54
        return $this->title;
22✔
55
    }
56

57
    public function getDescription(): string
58
    {
UNCOV
59
        return $this->description;
22✔
60
    }
61

62
    public function getVersion(): string
63
    {
UNCOV
64
        return $this->version;
22✔
65
    }
66

67
    public function getOAuthEnabled(): bool
68
    {
UNCOV
69
        return $this->oAuthEnabled;
27✔
70
    }
71

72
    public function getOAuthType(): ?string
73
    {
UNCOV
74
        return $this->oAuthType;
27✔
75
    }
76

77
    public function getOAuthFlow(): ?string
78
    {
UNCOV
79
        return $this->oAuthFlow;
27✔
80
    }
81

82
    public function getOAuthTokenUrl(): ?string
83
    {
UNCOV
84
        return $this->oAuthTokenUrl;
27✔
85
    }
86

87
    public function getOAuthAuthorizationUrl(): ?string
88
    {
UNCOV
89
        return $this->oAuthAuthorizationUrl;
27✔
90
    }
91

92
    public function getOAuthRefreshUrl(): ?string
93
    {
UNCOV
94
        return $this->oAuthRefreshUrl;
22✔
95
    }
96

97
    public function getOAuthScopes(): array
98
    {
UNCOV
99
        return $this->oAuthScopes;
27✔
100
    }
101

102
    public function getApiKeys(): array
103
    {
UNCOV
104
        return $this->apiKeys;
22✔
105
    }
106

107
    public function getHttpAuth(): array
108
    {
UNCOV
109
        return $this->httpAuth;
22✔
110
    }
111

112
    public function getContactName(): ?string
113
    {
114
        return $this->contactName;
×
115
    }
116

117
    public function getContactUrl(): ?string
118
    {
UNCOV
119
        return $this->contactUrl;
22✔
120
    }
121

122
    public function getContactEmail(): ?string
123
    {
124
        return $this->contactEmail;
×
125
    }
126

127
    public function getTermsOfService(): ?string
128
    {
UNCOV
129
        return $this->termsOfService;
22✔
130
    }
131

132
    public function getLicenseName(): ?string
133
    {
UNCOV
134
        return $this->licenseName;
22✔
135
    }
136

137
    public function getLicenseUrl(): ?string
138
    {
139
        return $this->licenseUrl;
×
140
    }
141

142
    public function getOverrideResponses(): bool
143
    {
UNCOV
144
        return $this->overrideResponses;
22✔
145
    }
146

147
    public function hasPersistAuthorization(): bool
148
    {
UNCOV
149
        return $this->persistAuthorization;
13✔
150
    }
151

152
    /**
153
     * @return Tag[]
154
     */
155
    public function getTags(): array
156
    {
UNCOV
157
        return $this->tags;
22✔
158
    }
159

160
    /**
161
     * @return class-string|null
162
     */
163
    public function getErrorResourceClass(): ?string
164
    {
UNCOV
165
        return $this->errorResourceClass;
22✔
166
    }
167

168
    /**
169
     * @return class-string|null
170
     */
171
    public function getValidationErrorResourceClass(): ?string
172
    {
UNCOV
173
        return $this->validationErrorResourceClass;
22✔
174
    }
175
}
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