Brightness   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 19
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 6 1
1
<?php namespace Modules\Media\Image\Intervention\Manipulations;
2
3
use Modules\Media\Image\ImageHandlerInterface;
4
5
class Brightness implements ImageHandlerInterface
6
{
7
    private $defaults = [
8
        'level' => 1,
9
    ];
10
11
    /**
12
     * Handle the image manipulation request
13
     * @param  \Intervention\Image\Image $image
14
     * @param  array                     $options
15
     * @return \Intervention\Image\Image
16
     */
17
    public function handle($image, $options)
18
    {
19
        $options = array_merge($this->defaults, $options);
20
21
        return $image->brightness($options['level']);
22
    }
23
}
24