WatchedMovieDTO   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 47
ccs 14
cts 14
cp 1
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getMovieId() 0 4 1
A getTmdbId() 0 4 1
A getVote() 0 4 1
A getWatchedAt() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Movies\DTO;
6
7
class WatchedMovieDTO
8
{
9
    private $movieId;
10
    private $tmdbId;
11
    private $vote;
12
    private $watchedAt;
13
14 9
    public function __construct(?int $movieId, ?int $tmdbId, ?float $vote, ?\DateTimeInterface $watchedAt)
15
    {
16 9
        $this->movieId = $movieId;
17 9
        $this->tmdbId = $tmdbId;
18 9
        $this->vote = $vote;
19 9
        $this->watchedAt = $watchedAt;
20 9
    }
21
22
    /**
23
     * @return int|null
24
     */
25 9
    public function getMovieId(): ?int
26
    {
27 9
        return $this->movieId;
28
    }
29
30
    /**
31
     * @return int|null
32
     */
33 9
    public function getTmdbId(): ?int
34
    {
35 9
        return $this->tmdbId;
36
    }
37
38
    /**
39
     * @return float|null
40
     */
41 9
    public function getVote(): ?float
42
    {
43 9
        return $this->vote;
44
    }
45
46
    /**
47
     * @return \DateTimeInterface|null
48
     */
49 9
    public function getWatchedAt(): ?\DateTimeInterface
50
    {
51 9
        return $this->watchedAt;
52
    }
53
}
54