Issues (73)

src/Command/ContrastCommand.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Jackal\ImageMerge\Command;
4
5
use Jackal\ImageMerge\Command\Options\LevelCommandOption;
6
use Jackal\ImageMerge\Model\Image;
7
8
class ContrastCommand extends AbstractCommand
9
{
10
    /**
11
     * ContrastCommand constructor.
12
     * @param LevelCommandOption $options
13
     */
14
    public function __construct(LevelCommandOption $options)
15
    {
16
        parent::__construct($options);
17
    }
18
19
    /**
20
     * @param Image $image
21
     * @return Image
22
     */
23
    public function execute(Image $image)
24
    {
25
        imagefilter($image->getResource(), IMG_FILTER_CONTRAST, $this->options->getLevel());
0 ignored issues
show
The method getLevel() does not exist on Jackal\ImageMerge\Comman...\CommandOptionInterface. It seems like you code against a sub-type of Jackal\ImageMerge\Comman...\CommandOptionInterface such as Jackal\ImageMerge\Comman...ions\LevelCommandOption. ( Ignorable by Annotation )

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

25
        imagefilter($image->getResource(), IMG_FILTER_CONTRAST, $this->options->/** @scrutinizer ignore-call */ getLevel());
Loading history...
26
27
        return $image;
28
    }
29
}
30