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

api-platform / core / 10944614151

19 Sep 2024 03:58PM UTC coverage: 7.518% (+0.2%) from 7.34%
10944614151

push

github

soyuka
chore: fix thanks url

12416 of 165161 relevant lines covered (7.52%)

23.02 hits per line

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

33.33
/src/OpenApi/Attributes/Webhook.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\Attributes;
15

16
use ApiPlatform\OpenApi\Model\PathItem;
17

18
class Webhook
19
{
20
    public function __construct(
21
        protected string $name,
22
        protected ?PathItem $pathItem = null,
23
    ) {
24
    }
3✔
25

26
    public function getName(): string
27
    {
28
        return $this->name;
39✔
29
    }
30

31
    public function withName(string $name): self
32
    {
33
        $self = clone $this;
×
34
        $self->name = $name;
×
35

36
        return $self;
×
37
    }
38

39
    public function getPathItem(): ?PathItem
40
    {
41
        return $this->pathItem;
39✔
42
    }
43

44
    public function withPathItem(PathItem $pathItem): self
45
    {
46
        $self = clone $this;
×
47
        $self->pathItem = $pathItem;
×
48

49
        return $self;
×
50
    }
51
}
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