Blurred::generateTinyPlaceholder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

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