Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
20.00% |
2 / 10 |
|
28.57% |
2 / 7 |
CRAP | |
0.00% |
0 / 1 |
Season | |
20.00% |
2 / 10 |
|
28.57% |
2 / 7 |
32.09 | |
0.00% |
0 / 1 |
getId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getNumber | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setNumber | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getNbEpisodes | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setNbEpisodes | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getMovie | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setMovie | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace App\Entity; |
4 | |
5 | use App\Repository\SeasonRepository; |
6 | use Doctrine\ORM\Mapping as ORM; |
7 | |
8 | use Symfony\Component\Serializer\Annotation\Groups; |
9 | |
10 | /** |
11 | * @ORM\Entity(repositoryClass=SeasonRepository::class) |
12 | */ |
13 | class Season |
14 | { |
15 | /** |
16 | * @ORM\Id |
17 | * @ORM\GeneratedValue |
18 | * @ORM\Column(type="integer") |
19 | * @Groups({"movie_read"}) |
20 | */ |
21 | private $id; |
22 | |
23 | /** |
24 | * @ORM\Column(type="integer") |
25 | * @Groups({"movie_read"}) |
26 | */ |
27 | private $number; |
28 | |
29 | /** |
30 | * @ORM\Column(type="integer") |
31 | * @Groups({"movie_read"}) |
32 | */ |
33 | private $nbEpisodes; |
34 | |
35 | /** |
36 | * @ORM\ManyToOne(targetEntity=Movie::class, inversedBy="seasons") |
37 | * @ORM\JoinColumn(nullable=false) |
38 | */ |
39 | private $movie; |
40 | |
41 | public function getId(): ?int |
42 | { |
43 | return $this->id; |
44 | } |
45 | |
46 | public function getNumber(): ?int |
47 | { |
48 | return $this->number; |
49 | } |
50 | |
51 | public function setNumber(int $number): self |
52 | { |
53 | $this->number = $number; |
54 | |
55 | return $this; |
56 | } |
57 | |
58 | public function getNbEpisodes(): ?int |
59 | { |
60 | return $this->nbEpisodes; |
61 | } |
62 | |
63 | public function setNbEpisodes(int $nbEpisodes): self |
64 | { |
65 | $this->nbEpisodes = $nbEpisodes; |
66 | |
67 | return $this; |
68 | } |
69 | |
70 | public function getMovie(): ?Movie |
71 | { |
72 | return $this->movie; |
73 | } |
74 | |
75 | public function setMovie(?Movie $movie): self |
76 | { |
77 | $this->movie = $movie; |
78 | |
79 | return $this; |
80 | } |
81 | } |