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

StreamToFileFilter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 2
dl 0
loc 10
rs 10
c 1
b 0
f 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A streamFilter() 0 3 1
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
}