Completed
Push — master ( c2f76d...03586b )
by Freek
11:35
created

Blurred::generateTinyPlaceholder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator;
4
5
use Spatie\Image\Image;
6
7
class Blurred implements TinyPlaceholderGenerator
8
{
9
    public function generateTinyPlaceholder(string $sourceImagePath, string $tinyImageDestinationPath)
10
    {
11
        $sourceImage = Image::load($sourceImagePath);
12
13
        $sourceImage->width(32)->blur(5)->save($tinyImageDestinationPath);
14
    }
15
}
16