Skip to content

Commit 1f803f1

Browse files
author
Lablnet
committed
Revert
1 parent ebea4d4 commit 1f803f1

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/ImageConverter.php

+10-9
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,22 @@
55
class ImageConverter
66
{
77
/** @var array */
8-
private $imageFormat = [];
8+
private $imageFormat = [
9+
'gif',
10+
'jpeg',
11+
'jpg',
12+
'png',
13+
'webp',
14+
];
915

1016
/** @var array */
1117
private $constImageFormat = [
12-
IMAGETYPE_GIF => 'gif',
18+
IMAGETYPE_GIF => 'gif',
1319
IMAGETYPE_JPEG => 'jpeg',
14-
IMAGETYPE_PNG => 'png',
20+
IMAGETYPE_PNG => 'png',
1521
IMAGETYPE_WEBP => 'webp',
1622
];
1723

18-
public function __construct()
19-
{
20-
$this->imageFormat = array_values($this->constImageFormat);
21-
}
22-
2324
/**
2425
* Do image conversion work
2526
*
@@ -181,4 +182,4 @@ private function makeDirectory($to)
181182
function convert($from, $to, $quality = null) {
182183
$converter = new ImageConverter();
183184
return $converter->convert($from, $to, $quality);
184-
}
185+
}

0 commit comments

Comments
 (0)