Completed
Push — master ( 1a9043...984777 )
by Valentyn
08:31
created

WatchedMovieDTO::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 6
cts 6
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 4
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace App\Movies\DTO;
5
6
class WatchedMovieDTO
7
{
8
    private $movieId;
9
    private $tmdbId;
10
    private $vote;
11
    private $watchedAt;
12
13 5
    public function __construct(?int $movieId, ?int $tmdbId, ?float $vote, ?\DateTimeInterface $watchedAt)
14
    {
15 5
        $this->movieId = $movieId;
16 5
        $this->tmdbId = $tmdbId;
17 5
        $this->vote = $vote;
18 5
        $this->watchedAt = $watchedAt;
19 5
    }
20
21
    /**
22
     * @return int|null
23
     */
24 5
    public function getMovieId(): ?int
25
    {
26 5
        return $this->movieId;
27
    }
28
29
    /**
30
     * @return int|null
31
     */
32 5
    public function getTmdbId(): ?int
33
    {
34 5
        return $this->tmdbId;
35
    }
36
37
    /**
38
     * @return float|null
39
     */
40 5
    public function getVote(): ?float
41
    {
42 5
        return $this->vote;
43
    }
44
45
    /**
46
     * @return \DateTimeInterface|null
47
     */
48 5
    public function getWatchedAt(): ?\DateTimeInterface
49
    {
50 5
        return $this->watchedAt;
51
    }
52
}