Passed
Push — master ( 67aa47...d37a32 )
by vincent
02:27
created

Catalog::getMovieGenres()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace vfalies\tmdb;
4
5
use vfalies\tmdb\Catalogs\Genres;
6
7
class Catalog
8
{
9
10
    private $tmdb = null;
11
12
    /**
13
     * Constructor
14
     * @param \vfalies\tmdb\Tmdb $tmdb
15
     */
16 5
    public function __construct(Tmdb $tmdb)
17
    {
18 5
        $this->tmdb = $tmdb;
19 5
    }
20
21
    /**
22
     * Get movie genres list
23
     * @param array $options
24
     * @return \Generator
25
     */
26 3
    public function getMovieGenres(array $options = array()): \Generator
27
    {
28 3
        $catalog = new Genres($this->tmdb);
29 3
        return $catalog->getMovieList($options);
30
    }
31
32
    /**
33
     * Get TVShow genres list
34
     * @param array $options
35
     * @return \Generator
36
     */
37 2
    public function getTVShowGenres(array $options = array()): \Generator
38
    {
39 2
        $catalog = new Genres($this->tmdb);
40 2
        return $catalog->getTVList($options);
41
    }
42
}
43