PeopleMovieCredit::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 6
nc 2
nop 3
dl 0
loc 9
ccs 6
cts 6
cp 1
crap 2
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
/**
3
 * This file is part of the Tmdb package.
4
 *
5
 * (c) Vincent Faliès <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @author Vincent Faliès <[email protected]>
11
 * @copyright Copyright (c) 2017
12
 */
13
14
15
namespace VfacTmdb\Items;
16
17
use VfacTmdb\Abstracts\Items\PeopleItemCredit;
18
use VfacTmdb\Exceptions\TmdbException;
19
use VfacTmdb\Interfaces\TmdbInterface;
20
use VfacTmdb\Results\PeopleMovieCast;
21
use VfacTmdb\Results\PeopleMovieCrew;
22
23
/**
24
 * People Movie Credit class
25
 * @package Tmdb
26
 * @author Vincent Faliès <[email protected]>
27
 * @copyright Copyright (c) 2017
28
 */
29
class PeopleMovieCredit extends PeopleItemCredit
30
{
31 60
    public function __construct(TmdbInterface $tmdb, int $people_id, array $options = array())
32
    {
33
        try {
34 60
            $this->crew_class = PeopleMovieCrew::class;
35 60
            $this->cast_class = PeopleMovieCast::class;
36
37 60
            parent::__construct($tmdb, 'movie', $people_id, $options);
38 3
        } catch (TmdbException $ex) {
39 3
            throw $ex;
40
        }
41 57
    }
42
}
43