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-2021 |
12
|
|
|
*/ |
13
|
|
|
|
14
|
|
|
|
15
|
|
|
namespace VfacTmdb\Items; |
16
|
|
|
|
17
|
|
|
use VfacTmdb\Abstracts\Items\ItemChanges; |
18
|
|
|
use VfacTmdb\Exceptions\TmdbException; |
19
|
|
|
use VfacTmdb\Interfaces\TmdbInterface; |
20
|
|
|
|
21
|
|
|
/** |
22
|
|
|
* TV Item Changes class |
23
|
|
|
* @package Tmdb |
24
|
|
|
* @author Steve Richter <[email protected]> |
25
|
|
|
* @copyright Copyright (c) 2021 |
26
|
|
|
*/ |
27
|
|
|
class TVItemChanges extends ItemChanges |
28
|
|
|
{ |
29
|
|
|
/** |
30
|
|
|
* Constructor |
31
|
|
|
* @param TmdbInterface $tmdb |
32
|
|
|
* @param int $movie_id |
33
|
|
|
* @param array $options |
34
|
|
|
*/ |
35
|
|
|
public function __construct(TmdbInterface $tmdb, int $movie_id, array $options = array()) |
36
|
|
|
{ |
37
|
|
|
try { |
38
|
|
|
parent::__construct($tmdb, 'tv', $movie_id, $options); |
39
|
|
|
} catch (TmdbException $ex) { |
40
|
|
|
throw $ex; |
41
|
|
|
} |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @return \AppendIterator|Results\ItemChange |
|
|
|
|
46
|
|
|
*/ |
47
|
|
|
public function getSeasonChanges() |
48
|
|
|
{ |
49
|
|
|
$seasonChanges = new \AppendIterator(); |
50
|
|
|
foreach ($this->getChangesByKey('season') as $change) { |
51
|
|
|
if (null !== $change->getValueByKey('season_id')) { |
52
|
|
|
$seasonChanges->append( |
53
|
|
|
(new TVSeasonItemChanges($this->tmdb, $change->getValueByKey('season_id'), $this->params)) |
|
|
|
|
54
|
|
|
->getChanges() |
55
|
|
|
); |
56
|
|
|
} |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
return $seasonChanges; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @return \AppendIterator|Results\ItemChange |
64
|
|
|
*/ |
65
|
|
|
public function getEpisodeChanges() |
66
|
|
|
{ |
67
|
|
|
$episodeChanges = new \AppendIterator(); |
68
|
|
|
foreach ($this->getSeasonChanges() as $seasonChange) { |
69
|
|
|
if (null !== $seasonChange->getValueByKey('episode_id')) { |
70
|
|
|
$episodeChanges->append( |
71
|
|
|
(new TVEpisodeItemChanges($this->tmdb, $seasonChange->getValueByKey('episode_id'), $this->params)) |
72
|
|
|
->getChanges() |
73
|
|
|
); |
74
|
|
|
} |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
return $episodeChanges; |
78
|
|
|
} |
79
|
|
|
} |
80
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths