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

api-platform / core / 14726100744

29 Apr 2025 07:49AM UTC coverage: 8.463% (-0.02%) from 8.479%
14726100744

push

github

web-flow
doc(doctrine): compute and sort a virtual field (#7113)

9 of 180 new or added lines in 6 files covered. (5.0%)

293 existing lines in 12 files now uncovered.

13400 of 158343 relevant lines covered (8.46%)

22.89 hits per line

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

0.0
/tests/Fixtures/TestBundle/Entity/CartProduct.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\NotExposed;
17
use Doctrine\ORM\Mapping as ORM;
18

19
#[ORM\Entity]
20
#[NotExposed()]
21
class CartProduct
22
{
23
    #[ORM\Id]
24
    #[ORM\GeneratedValue]
25
    #[ORM\Column(type: 'integer')]
26
    private ?int $id = null;
27

28
    #[ORM\ManyToOne(targetEntity: Cart::class, inversedBy: 'items')]
29
    #[ORM\JoinColumn(nullable: false)]
30
    private ?Cart $cart = null;
31

32
    #[ORM\Column(type: 'integer')]
33
    private int $quantity = 1;
34

35
    public function getId(): ?int
36
    {
NEW
37
        return $this->id;
×
38
    }
39

40
    public function getCart(): ?Cart
41
    {
NEW
42
        return $this->cart;
×
43
    }
44

45
    public function setCart(?Cart $cart): self
46
    {
NEW
47
        $this->cart = $cart;
×
48

NEW
49
        return $this;
×
50
    }
51

52
    public function getQuantity(): int
53
    {
NEW
54
        return $this->quantity;
×
55
    }
56

57
    public function setQuantity(int $quantity): self
58
    {
NEW
59
        $this->quantity = $quantity;
×
60

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