Total Complexity | 6 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class StoragePictureHandler implements PictureHandler |
||
11 | { |
||
12 | public function add(string $path, float $width, float $height) |
||
13 | { |
||
14 | Image::make(public_path('test/640*360.png'))->resize($width, $height)->save($path); |
||
15 | } |
||
16 | |||
17 | public function widen(string $source, string $dest, float $width) |
||
18 | { |
||
19 | $img = Image::make($source)->widen($width); |
||
20 | $img->save($dest); |
||
21 | } |
||
22 | |||
23 | public function heighten(string $source, string $dest, float $height) |
||
24 | { |
||
25 | $img = Image::make($source)->heighten($height); |
||
26 | $img->save($dest); |
||
27 | } |
||
28 | |||
29 | public function width(string $path) |
||
30 | { |
||
31 | return Image::make($path)->width(); |
||
32 | } |
||
33 | |||
34 | public function height(string $path) |
||
37 | } |
||
38 | |||
39 | public function write(string $source, string $dest) |
||
43 | } |
||
44 | |||
45 | } |
||
46 |