Completed
Push — master ( 4bf0e7...bd9861 )
by Lukas Kahwe
12:31
created

GrayscaleFilterLoader::load()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace Liip\ImagineBundle\Imagine\Filter\Loader;
4
5
use Imagine\Filter\Advanced\Grayscale;
6
use Imagine\Image\ImageInterface;
7
8
/**
9
 * GrayscaleFilterLoader - apply grayscale filter.
10
 *
11
 * @author Gregoire Humeau <[email protected]>
12
 */
13
class GrayscaleFilterLoader implements LoaderInterface
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function load(ImageInterface $image, array $options = array())
19
    {
20
        $filter = new Grayscale();
21
22
        return $filter->apply($image);
23
    }
24
}
25