Failed Conditions
Push — master ( 356b1f...e74f9e )
by Adrien
10:44
created

Item::getBookings()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Application\Model;
6
7
use Application\Traits\HasDescription;
8
use Application\Traits\HasName;
9
use Doctrine\Common\Collections\ArrayCollection;
10
use Doctrine\Common\Collections\Collection;
11
use Doctrine\ORM\Mapping as ORM;
12
13
/**
14
 * User
15
 *
16
 * @ORM\Entity(repositoryClass="Application\Repository\ItemRepository")
17
 */
18
class Item extends AbstractModel
19
{
20
    use HasName;
21
    use HasDescription;
22
23
    /**
24
     * @var Collection
25
     *
26
     * @ORM\ManyToMany(targetEntity="Application\Model\Booking", mappedBy="items")
27
     */
28
    private $bookings;
29
30
    /**
31
     * Constructor
32
     */
33
    public function __construct()
34
    {
35
        $this->bookings = new ArrayCollection();
36
    }
37
38
    /**
39
     * @return Collection
40
     */
41
    public function getBookings(): Collection
42
    {
43
        return $this->bookings;
44
    }
45
}
46