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

api-platform / core / 10014117656

19 Jul 2024 08:44PM UTC coverage: 7.856% (-56.3%) from 64.185%
10014117656

push

github

soyuka
Merge branch 'sf/remove-flag'

0 of 527 new or added lines in 83 files covered. (0.0%)

10505 existing lines in 362 files now uncovered.

12705 of 161727 relevant lines covered (7.86%)

26.85 hits per line

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

0.0
/tests/Fixtures/TestBundle/Entity/DummyWithCollectDenormalizationErrors.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\Tests\Fixtures\TestBundle\Entity;
15

16
use ApiPlatform\Metadata\ApiResource;
17
use ApiPlatform\Metadata\Post;
18
use Doctrine\Common\Collections\Collection;
19
use Doctrine\ORM\Mapping as ORM;
20
use Ramsey\Uuid\UuidInterface;
21

22
#[ApiResource(
23
    operations: [
×
24
        new Post(uriTemplate: 'dummy_collect_denormalization'),
×
25
    ],
×
NEW
26
    collectDenormalizationErrors: true
×
27
)]
×
28
#[ORM\Entity]
29
class DummyWithCollectDenormalizationErrors
30
{
31
    #[ORM\Id]
32
    #[ORM\Column(type: 'integer')]
33
    #[ORM\GeneratedValue(strategy: 'AUTO')]
34
    private ?int $id = null;
35

36
    #[ORM\Column(nullable: true)]
37
    public ?bool $foo;
38

39
    #[ORM\Column(nullable: true)]
40
    public ?int $bar;
41

42
    #[ORM\Column(nullable: true)]
43
    private ?string $baz;
44

45
    #[ORM\Column(nullable: true)]
46
    private ?string $qux;
47

48
    #[ORM\Column(type: 'uuid', nullable: true)]
49
    public ?UuidInterface $uuid = null;
50

51
    #[ORM\ManyToOne(targetEntity: RelatedDummy::class)]
52
    public ?RelatedDummy $relatedDummy = null;
53

54
    #[ORM\ManyToMany(targetEntity: RelatedDummy::class)]
55
    public Collection|iterable $relatedDummies;
56

57
    public function __construct(string $baz, ?string $qux = null)
58
    {
59
        $this->baz = $baz;
×
60
        $this->qux = $qux;
×
61
    }
62

63
    public function getId(): ?int
64
    {
65
        return $this->id;
×
66
    }
67

68
    public function getFoo(): ?bool
69
    {
70
        return $this->foo;
×
71
    }
72

73
    public function setFoo(?bool $foo): void
74
    {
75
        $this->foo = $foo;
×
76
    }
77

78
    public function getBar(): ?int
79
    {
80
        return $this->bar;
×
81
    }
82

83
    public function setBar(?int $bar): void
84
    {
85
        $this->bar = $bar;
×
86
    }
87
}
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