GifsicleFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 1
1
<?php
2
3
namespace Rvdlee\ZfImageOptimiser\Factory\Adapter;
4
5
use Interop\Container\ContainerInterface;
6
use Rvdlee\ZfImageOptimiser\Adapter\Gifsicle;
7
8
class GifsicleFactory extends AbstractImageOptimiserFactory
9
{
10
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
11
    {
12
        /** @var array $args */
13
        $args = parent::__invoke($container, $requestedName, $options);
14
15
        return new Gifsicle(...$args);
0 ignored issues
show
Bug introduced by
It seems like $args can also be of type Zend\Validator\ValidatorChain; however, parameter $binaryOptions of Rvdlee\ZfImageOptimiser\...Gifsicle::__construct() does only seem to accept array, maybe add an additional type check? ( Ignorable by Annotation )

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

15
        return new Gifsicle(/** @scrutinizer ignore-type */ ...$args);
Loading history...
16
    }
17
}