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

api-platform / core / 13203378522

07 Feb 2025 03:56PM UTC coverage: 8.501% (+0.7%) from 7.837%
13203378522

push

github

soyuka
Merge 4.1

111 of 490 new or added lines in 51 files covered. (22.65%)

5590 existing lines in 163 files now uncovered.

13345 of 156987 relevant lines covered (8.5%)

22.88 hits per line

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

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

20
    public function __construct(private string $name, private ?string $description = null, private ?string $externalDocs = null)
21
    {
22
    }
47✔
23

24
    public function getName(): string
25
    {
26
        return $this->name;
47✔
27
    }
28

29
    public function getDescription(): ?string
30
    {
31
        return $this->description;
47✔
32
    }
33

34
    public function withName(string $name): self
35
    {
NEW
36
        $clone = clone $this;
×
NEW
37
        $clone->name = $name;
×
38

NEW
39
        return $clone;
×
40
    }
41

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

NEW
47
        return $clone;
×
48
    }
49

50
    public function getExternalDocs(): string
51
    {
52
        return $this->externalDocs;
47✔
53
    }
54

55
    public function withExternalDocs(string $externalDocs): self
56
    {
NEW
57
        $clone = clone $this;
×
NEW
58
        $clone->externalDocs = $externalDocs;
×
59

NEW
60
        return $clone;
×
61
    }
62
}
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

© 2026 Coveralls, Inc