StreamToFileFilter::streamFilter()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
/**
4
 * This file is part of the PHP-FFmpeg-video-streaming package.
5
 *
6
 * (c) Amin Yazdanpanah <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
13
namespace Streaming\Filters;
14
15
16
use Streaming\StreamInterface;
17
18
class StreamToFileFilter extends FormatFilter
19
{
20
21
    /**
22
     * @param $media
23
     * @return mixed
24
     */
25
    public function streamFilter(StreamInterface $media): void
26
    {
27
        $this->filter = array_merge(
28
            $this->getFormatOptions($media->getFormat()),
29
            $media->getParams()
0 ignored issues
show
Bug introduced by
The method getParams() does not exist on Streaming\StreamInterface. It seems like you code against a sub-type of Streaming\StreamInterface such as Streaming\StreamToFile. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

29
            $media->/** @scrutinizer ignore-call */ 
30
                    getParams()
Loading history...
30
        );
31
    }
32
}