Medium   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A applyFilter() 0 6 1
1
<?php
2
3
namespace Larafolio\Http\ImageFilters;
4
5
use Intervention\Image\Image;
6
use Intervention\Image\Constraint;
7
use Intervention\Image\Filters\FilterInterface;
8
9
class Medium implements FilterInterface
10
{
11
    /**
12
     * Apply medium filter to image.
13
     *
14
     * @param \Intervention\Image\Image $image
15
     *
16
     * @return \Intervention\Image\Image
17
     */
18
    public function applyFilter(Image $image)
19
    {
20
        return $image->resize(null, 300, function (Constraint $constraint) {
21
            $constraint->aspectRatio();
22
        });
23
    }
24
}
25