| Total Complexity | 8 |
| Total Lines | 69 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class Media |
||
| 19 | { |
||
| 20 | /** @var \FFMpeg\Media\Video */ |
||
| 21 | private $media; |
||
| 22 | |||
| 23 | /** @var bool */ |
||
| 24 | private $is_tmp; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Media constructor. |
||
| 28 | * @param MediaTypeInterface $media |
||
| 29 | * @param bool $is_tmp |
||
| 30 | */ |
||
| 31 | public function __construct(MediaTypeInterface $media, bool $is_tmp) |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return DASH |
||
| 39 | */ |
||
| 40 | public function dash(): DASH |
||
| 41 | { |
||
| 42 | return new DASH($this); |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return HLS |
||
| 47 | */ |
||
| 48 | public function hls(): HLS |
||
| 49 | { |
||
| 50 | return new HLS($this); |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return StreamToFile |
||
| 55 | */ |
||
| 56 | public function stream2file(): StreamToFile |
||
| 57 | { |
||
| 58 | return new StreamToFile($this); |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return bool |
||
| 63 | */ |
||
| 64 | public function isTmp(): bool |
||
| 65 | { |
||
| 66 | return $this->is_tmp; |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @param $argument |
||
| 71 | * @return Media | \FFMpeg\Media\Video |
||
| 72 | */ |
||
| 73 | private function isInstanceofArgument($argument) |
||
| 76 | } |
||
| 77 | |||
| 78 | /** |
||
| 79 | * @param $method |
||
| 80 | * @param $parameters |
||
| 81 | * @return Media | \FFMpeg\Media\Video |
||
| 82 | */ |
||
| 83 | public function __call($method, $parameters) |
||
| 87 | ); |
||
| 88 | } |
||
| 89 | } |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.