Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
30.77% |
4 / 13 |
|
44.44% |
4 / 9 |
CRAP | |
0.00% |
0 / 1 |
Casting | |
30.77% |
4 / 13 |
|
44.44% |
4 / 9 |
35.88 | |
0.00% |
0 / 1 |
getId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getRole | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setRole | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getCreditOrder | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setCreditOrder | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getPerson | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setPerson | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getMovie | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setMovie | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace App\Entity; |
4 | |
5 | use App\Repository\CastingRepository; |
6 | use Doctrine\ORM\Mapping as ORM; |
7 | use Symfony\Component\Serializer\Annotation\Groups; |
8 | |
9 | /** |
10 | * @ORM\Entity(repositoryClass=CastingRepository::class) |
11 | */ |
12 | class Casting |
13 | { |
14 | /** |
15 | * @ORM\Id |
16 | * @ORM\GeneratedValue |
17 | * @ORM\Column(type="integer") |
18 | * @Groups({"movie_read"}) |
19 | */ |
20 | private $id; |
21 | |
22 | /** |
23 | * @ORM\Column(type="string", length=255) |
24 | * @Groups({"movie_read"}) |
25 | */ |
26 | private $role; |
27 | |
28 | /** |
29 | * @ORM\Column(type="integer") |
30 | * @Groups({"movie_read"}) |
31 | */ |
32 | private $creditOrder; |
33 | |
34 | /** |
35 | * @ORM\ManyToOne(targetEntity=Person::class, inversedBy="castings") |
36 | * @ORM\JoinColumn(nullable=false) |
37 | * @Groups({"movie_read"}) |
38 | */ |
39 | private $person; |
40 | |
41 | /** |
42 | * @ORM\ManyToOne(targetEntity=Movie::class, inversedBy="castings") |
43 | * @ORM\JoinColumn(nullable=false) |
44 | */ |
45 | private $movie; |
46 | |
47 | public function getId(): ?int |
48 | { |
49 | return $this->id; |
50 | } |
51 | |
52 | public function getRole(): ?string |
53 | { |
54 | return $this->role; |
55 | } |
56 | |
57 | public function setRole(string $role): self |
58 | { |
59 | $this->role = $role; |
60 | |
61 | return $this; |
62 | } |
63 | |
64 | public function getCreditOrder(): ?int |
65 | { |
66 | return $this->creditOrder; |
67 | } |
68 | |
69 | public function setCreditOrder(int $creditOrder): self |
70 | { |
71 | $this->creditOrder = $creditOrder; |
72 | |
73 | return $this; |
74 | } |
75 | |
76 | public function getPerson(): ?Person |
77 | { |
78 | return $this->person; |
79 | } |
80 | |
81 | public function setPerson(?Person $person): self |
82 | { |
83 | $this->person = $person; |
84 | |
85 | return $this; |
86 | } |
87 | |
88 | public function getMovie(): ?Movie |
89 | { |
90 | return $this->movie; |
91 | } |
92 | |
93 | public function setMovie(?Movie $movie): self |
94 | { |
95 | $this->movie = $movie; |
96 | |
97 | return $this; |
98 | } |
99 | } |