Total Complexity | 4 |
Total Lines | 59 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
26 | class AlternativeName extends Results |
||
27 | { |
||
28 | /** |
||
29 | * Id |
||
30 | * @var int |
||
31 | */ |
||
32 | protected $id; |
||
33 | /** |
||
34 | * Name |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $name; |
||
38 | /** |
||
39 | * Type |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $type; |
||
43 | |||
44 | /** |
||
45 | * Constructor |
||
46 | * @param TmdbInterface $tmdb |
||
47 | * @param int $id |
||
48 | * @param \stdClass $result |
||
49 | */ |
||
50 | 15 | public function __construct(TmdbInterface $tmdb, int $id, \stdClass $result) |
|
51 | { |
||
52 | 15 | $result->id = $id; |
|
53 | 15 | parent::__construct($tmdb, $result); |
|
54 | |||
55 | 12 | $this->id = (int) $id; |
|
56 | 12 | $this->name = $result->name; |
|
57 | 12 | $this->type = $result->type; |
|
58 | 12 | } |
|
59 | |||
60 | /** |
||
61 | * Id |
||
62 | * @return int |
||
63 | */ |
||
64 | 3 | public function getId() : int |
|
65 | { |
||
66 | 3 | return $this->id; |
|
67 | } |
||
68 | |||
69 | /** |
||
70 | * Name |
||
71 | * @return string |
||
72 | */ |
||
73 | 3 | public function getName() : string |
|
76 | } |
||
77 | |||
78 | /** |
||
79 | * Type |
||
80 | * @return string |
||
81 | */ |
||
82 | 3 | public function getType() : string |
|
85 | } |
||
86 | } |
||
87 |