Passed
Branch account (ed4c74)
by vincent
02:20
created

PeopleMovieCredit::getCast()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 9
Code Lines 5

Duplication

Lines 9
Ratio 100 %

Code Coverage

Tests 6
CRAP Score 3

Importance

Changes 0
Metric Value
dl 9
loc 9
ccs 6
cts 6
cp 1
rs 9.6666
c 0
b 0
f 0
cc 3
eloc 5
nc 3
nop 0
crap 3
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 View Code Duplication
class PeopleMovieCredit extends PeopleItemCredit
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
30
{
31 20
    public function __construct(TmdbInterface $tmdb, int $people_id, array $options = array())
32
    {
33
        try {
34 20
            $this->crew_class = PeopleMovieCrew::class;
35 20
            $this->cast_class = PeopleMovieCast::class;
36
37 20
            parent::__construct($tmdb, 'movie', $people_id, $options);
38 1
        } catch (TmdbException $ex) {
39 1
            throw $ex;
40
        }
41 19
    }
42
}
43