• 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/DummyValidation.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\GetCollection;
18
use ApiPlatform\Metadata\Post;
19
use Doctrine\ORM\Mapping as ORM;
20
use Symfony\Component\Validator\Constraints as Assert;
21

22
#[ApiResource(operations: [
23
    new GetCollection(),
×
24
    new Post(uriTemplate: 'dummy_validation{._format}'),
×
NEW
25
    new Post(uriTemplate: '/dummy_validation/validation_groups', validationContext: ['groups' => ['a']]),
×
NEW
26
    new Post(uriTemplate: '/dummy_validation/validation_sequence', validationContext: ['groups' => 'app.dummy_validation.group_generator']),
×
27
]
×
28
)]
×
29
#[ORM\Entity]
30
class DummyValidation
31
{
32
    /**
33
     * @var int|null The id
34
     */
35
    #[ORM\Column(type: 'integer')]
36
    #[ORM\Id]
37
    #[ORM\GeneratedValue(strategy: 'AUTO')]
38
    private ?int $id = null;
39
    /**
40
     * @var string|null The dummy name
41
     */
42
    #[ORM\Column(nullable: true)]
43
    #[Assert\NotNull(groups: ['a'])]
44
    private ?string $name = null;
45
    /**
46
     * @var string|null The dummy title
47
     */
48
    #[ORM\Column(nullable: true)]
49
    #[Assert\NotNull(groups: ['b'])]
50
    private ?string $title = null;
51
    /**
52
     * @var string The dummy code
53
     */
54
    #[ORM\Column]
55
    private string $code;
56

57
    public function getId(): ?int
58
    {
59
        return $this->id;
×
60
    }
61

62
    public function setId(int $id): self
63
    {
64
        $this->id = $id;
×
65

66
        return $this;
×
67
    }
68

69
    public function getName(): ?string
70
    {
71
        return $this->name;
×
72
    }
73

74
    public function setName(?string $name): self
75
    {
76
        $this->name = $name;
×
77

78
        return $this;
×
79
    }
80

81
    public function getTitle(): ?string
82
    {
83
        return $this->title;
×
84
    }
85

86
    public function setTitle(?string $title): self
87
    {
88
        $this->title = $title;
×
89

90
        return $this;
×
91
    }
92

93
    public function getCode(): ?string
94
    {
95
        return $this->code;
×
96
    }
97

98
    public function setCode(string $code): self
99
    {
100
        $this->code = $code;
×
101

102
        return $this;
×
103
    }
104
}
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