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

api-platform / core / 5761736306

pending completion
5761736306

push

github

web-flow
fix(openapi): model Example, Header and Reference (#5716)

81 of 81 new or added lines in 4 files covered. (100.0%)

9297 of 16116 relevant lines covered (57.69%)

52.5 hits per line

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

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

20
    public function __construct(private ?string $summary = null, private ?string $description = null, private mixed $value = null, private ?string $externalValue = null)
21
    {
22
    }
×
23

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

29
    public function withSummary(string $summary): self
30
    {
31
        $clone = clone $this;
×
32
        $clone->summary = $summary;
×
33

34
        return $clone;
×
35
    }
36

37
    public function getDescription(): ?string
38
    {
39
        return $this->description;
×
40
    }
41

42
    public function withDescription(string $description): self
43
    {
44
        $clone = clone $this;
×
45
        $clone->description = $description;
×
46

47
        return $clone;
×
48
    }
49

50
    public function getValue(): mixed
51
    {
52
        return $this->value;
×
53
    }
54

55
    public function withValue(mixed $value): self
56
    {
57
        $clone = clone $this;
×
58
        $clone->value = $value;
×
59

60
        return $clone;
×
61
    }
62

63
    public function getExternalValue(): ?string
64
    {
65
        return $this->externalValue;
×
66
    }
67

68
    public function withExternalValue(string $externalValue): self
69
    {
70
        $clone = clone $this;
×
71
        $clone->externalValue = $externalValue;
×
72

73
        return $clone;
×
74
    }
75
}
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