Passed
Push — master ( 4bc7af...ac0e9d )
by Amin
02:25
created

StreamToFileFilter::streamFilter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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
use Streaming\StreamToFile;
18
19
class StreamToFileFilter extends StreamFilter
20
{
21
22
    /**
23
     * @param $media
24
     * @return mixed
25
     */
26
    public function streamFilter(StreamInterface $media): void
27
    {
28
        $this->filter = array_merge(['-c', 'copy'], $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

28
        $this->filter = array_merge(['-c', 'copy'], $media->/** @scrutinizer ignore-call */ getParams());
Loading history...
29
    }
30
}