InterlaceFilterLoader   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 17
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 11 2
1
<?php
2
3
/*
4
 * This file is part of the `liip/LiipImagineBundle` project.
5
 *
6
 * (c) https://github.com/liip/LiipImagineBundle/graphs/contributors
7
 *
8
 * For the full copyright and license information, please view the LICENSE.md
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Liip\ImagineBundle\Imagine\Filter\Loader;
13
14
use Imagine\Image\ImageInterface;
15
16
class InterlaceFilterLoader implements LoaderInterface
17
{
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function load(ImageInterface $image, array $options = [])
22
    {
23
        $mode = ImageInterface::INTERLACE_LINE;
24
        if (!empty($options['mode'])) {
25
            $mode = $options['mode'];
26
        }
27
28
        $image->interlace($mode);
29
30
        return $image;
31
    }
32
}
33