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

api-platform / core / 15955912273

29 Jun 2025 01:51PM UTC coverage: 22.057% (-0.03%) from 22.082%
15955912273

Pull #7249

github

web-flow
Merge d9904d788 into a42034dc3
Pull Request #7249: chore: solve some phpstan issues

0 of 9 new or added lines in 8 files covered. (0.0%)

11540 existing lines in 372 files now uncovered.

11522 of 52237 relevant lines covered (22.06%)

11.08 hits per line

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

0.0
/src/Doctrine/Common/Tests/Fixtures/TestBundle/Entity/DummyFriend.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\Doctrine\Common\Tests\Fixtures\TestBundle\Entity;
15

16
use ApiPlatform\Metadata\ApiProperty;
17
use ApiPlatform\Metadata\ApiResource;
18
use Doctrine\ORM\Mapping as ORM;
19
use Symfony\Component\Serializer\Annotation\Groups;
20
use Symfony\Component\Validator\Constraints as Assert;
21

22
/**
23
 * Dummy Friend.
24
 *
25
 * @author Kévin Dunglas <dunglas@gmail.com>
26
 */
27
#[ApiResource]
28
#[ORM\Entity]
29
class DummyFriend implements \Stringable
30
{
31
    /**
32
     * @var int|null The id
33
     */
34
    #[ORM\Column(type: 'integer')]
35
    #[ORM\Id]
36
    #[ORM\GeneratedValue(strategy: 'AUTO')]
37
    private ?int $id = null;
38

39
    /**
40
     * @var string The dummy name
41
     */
42
    #[ApiProperty(types: ['https://schema.org/name'])]
43
    #[ORM\Column]
44
    #[Assert\NotBlank]
45
    #[Groups(['fakemanytomany', 'friends'])]
46
    private string $name;
47

48
    /**
49
     * Get id.
50
     */
51
    public function getId(): ?int
52
    {
53
        return $this->id;
×
54
    }
55

56
    /**
57
     * Set id.
58
     *
59
     * @param int $id the value to set
60
     */
61
    public function setId(int $id): void
62
    {
63
        $this->id = $id;
×
64
    }
65

66
    /**
67
     * Get name.
68
     */
69
    public function getName(): ?string
70
    {
71
        return $this->name;
×
72
    }
73

74
    /**
75
     * Set name.
76
     *
77
     * @param string $name the value to set
78
     */
79
    public function setName(string $name): void
80
    {
81
        $this->name = $name;
×
82
    }
83

84
    public function __toString(): string
85
    {
86
        return (string) $this->getId();
×
87
    }
88
}
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