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

GrayscaleFilterLoader   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 6 1
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