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

api-platform / core / 3713134090

pending completion
3713134090

Pull #5254

github

GitHub
Merge b2ec54b3c into ac711530f
Pull Request #5254: [OpenApi] Add ApiResource::openapi and deprecate openapiContext

197 of 197 new or added lines in 5 files covered. (100.0%)

10372 of 12438 relevant lines covered (83.39%)

11.97 hits per line

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

0.0
/src/OpenApi/Model/Encoding.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 Encoding
17
{
18
    use ExtensionTrait;
19

20
    public function __construct(private string $contentType = '', private ?\ArrayObject $headers = null, private string $style = '', private bool $explode = false, private bool $allowReserved = false)
21
    {
22
    }
×
23

24
    public function getContentType(): string
25
    {
26
        return $this->contentType;
×
27
    }
28

29
    public function getHeaders(): ?\ArrayObject
30
    {
31
        return $this->headers;
×
32
    }
33

34
    public function getStyle(): string
35
    {
36
        return $this->style;
×
37
    }
38

39
    public function canExplode(): bool
40
    {
41
        return $this->explode;
×
42
    }
43

44
    public function getExplode(): bool
45
    {
46
        return $this->explode;
×
47
    }
48

49
    public function canAllowReserved(): bool
50
    {
51
        return $this->allowReserved;
×
52
    }
53

54
    public function getAllowReserved(): bool
55
    {
56
        return $this->allowReserved;
×
57
    }
58

59
    public function withContentType(string $contentType): self
60
    {
61
        $clone = clone $this;
×
62
        $clone->contentType = $contentType;
×
63

64
        return $clone;
×
65
    }
66

67
    public function withHeaders(?\ArrayObject $headers): self
68
    {
69
        $clone = clone $this;
×
70
        $clone->headers = $headers;
×
71

72
        return $clone;
×
73
    }
74

75
    public function withStyle(string $style): self
76
    {
77
        $clone = clone $this;
×
78
        $clone->style = $style;
×
79

80
        return $clone;
×
81
    }
82

83
    public function withExplode(bool $explode): self
84
    {
85
        $clone = clone $this;
×
86
        $clone->explode = $explode;
×
87

88
        return $clone;
×
89
    }
90

91
    public function withAllowReserved(bool $allowReserved): self
92
    {
93
        $clone = clone $this;
×
94
        $clone->allowReserved = $allowReserved;
×
95

96
        return $clone;
×
97
    }
98
}
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