tidy
This commit is contained in:
parent
77fc510bb3
commit
394e57103c
3 changed files with 3 additions and 14 deletions
|
@ -57,10 +57,6 @@ class FlashFileHandler extends DataHandlerExtension
|
|||
$fp = fopen($tmpname, "r");
|
||||
$head = fread($fp, 3);
|
||||
fclose($fp);
|
||||
if (!in_array($head, ["CWS", "FWS"])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return in_array($head, ["CWS", "FWS"]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,6 @@ class MP3FileHandler extends DataHandlerExtension
|
|||
|
||||
protected function check_contents(string $tmpname): bool
|
||||
{
|
||||
$mimeType = getMimeType($tmpname);
|
||||
return ($mimeType == 'audio/mpeg');
|
||||
return getMimeType($tmpname) == 'audio/mpeg';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,13 +64,7 @@ class PixelFileHandler extends DataHandlerExtension
|
|||
{
|
||||
$valid = [IMAGETYPE_PNG, IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_WEBP];
|
||||
$info = getimagesize($tmpname);
|
||||
if (!$info) {
|
||||
return false;
|
||||
}
|
||||
if (in_array($info[2], $valid)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return $info && in_array($info[2], $valid);
|
||||
}
|
||||
|
||||
protected function create_thumb(string $hash, string $type): bool
|
||||
|
|
Reference in a new issue