Issues (17)

src/Factory/Adapter/OptipngFactory.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Rvdlee\ZfImageOptimiser\Factory\Adapter;
4
5
use Interop\Container\ContainerInterface;
6
use Rvdlee\ZfImageOptimiser\Adapter\Optipng;
7
8
class OptipngFactory 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 Optipng(...$args);
0 ignored issues
show
It seems like $args can also be of type Zend\Validator\ValidatorChain; however, parameter $binaryOptions of Rvdlee\ZfImageOptimiser\...\Optipng::__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 Optipng(/** @scrutinizer ignore-type */ ...$args);
Loading history...
16
    }
17
}