Skip to content

Commit 2c101d8

Browse files
committed
Fix option 'quality array'
1 parent fb76333 commit 2c101d8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Colorist.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ protected function quality(string $file, array $options): string
9292
{
9393
$quality = $options['quality'];
9494

95-
if (is_array($quality) === true) {
95+
if (is_array($quality)) {
9696
$format = $options['format'] === null
9797
? pathinfo($file, PATHINFO_EXTENSION)
9898
: $options['format']
9999
;
100100

101-
if (in_array($format, $quality) === true) {
101+
if (array_key_exists($format, $quality)) {
102102
$quality = $quality[$format];
103103
} else {
104104
return '';
@@ -275,7 +275,7 @@ protected function cmm(array $options): string
275275
'lcms',
276276
];
277277

278-
if (in_array($options['cmm'], $modules) === true) {
278+
if (in_array($options['cmm'], $modules)) {
279279
return '--cmm ' . $options['cmm'];
280280
}
281281

@@ -341,7 +341,7 @@ protected function format(array $options): string
341341
'webp',
342342
];
343343

344-
if (in_array($options['format'], $formats) === true) {
344+
if (in_array($options['format'], $formats)) {
345345
return '--format ' . $options['format'];
346346
}
347347

@@ -381,7 +381,7 @@ protected function tonemap(array $options): string
381381
'off',
382382
];
383383

384-
if (in_array($options['tonemap'], $tonemap) === true) {
384+
if (in_array($options['tonemap'], $tonemap)) {
385385
return '--tonemap ' . $options['tonemap'];
386386
}
387387

@@ -398,7 +398,7 @@ protected function yuv(array $options): string
398398
'yv12',
399399
];
400400

401-
if (in_array($options['yuv'], $yuv) === true) {
401+
if (in_array($options['yuv'], $yuv)) {
402402
return '--yuv ' . $options['yuv'];
403403
}
404404

0 commit comments

Comments
 (0)