VideoWebMGenerator   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getVideoFormat() 0 8 2
1
<?php
2
3
namespace Jackal\Giffhanger\Generator;
4
5
use FFMpeg\Format\Video\WebM;
6
7
class VideoWebMGenerator extends AbstractVideoGenerator
8
{
9
    /**
10
     * @return WebM
11
     */
12
    protected function getVideoFormat() : WebM
13
    {
14
        $videoFormat = new WebM();
15
        if ($this->options->getVideoBitrate()) {
16
            $videoFormat->setKiloBitrate($this->options->getVideoBitrate());
0 ignored issues
show
Bug introduced by
$this->options->getVideoBitrate() of type string is incompatible with the type integer expected by parameter $kiloBitrate of FFMpeg\Format\Video\DefaultVideo::setKiloBitrate(). ( Ignorable by Annotation )

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

16
            $videoFormat->setKiloBitrate(/** @scrutinizer ignore-type */ $this->options->getVideoBitrate());
Loading history...
17
        }
18
19
        return $videoFormat;
20
    }
21
}
22