1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-06 14:16:28 +02:00

simplify return statement

This commit is contained in:
Elan Ruusamäe
2018-01-05 14:35:09 +02:00
parent f9c96b6a3c
commit c580d24e1b

View File

@@ -180,8 +180,13 @@ class Minify_Source implements Minify_SourceInterface
} else {
$content = file_get_contents($this->filepath);
}
// remove UTF-8 BOM if present
return ("\xEF\xBB\xBF" === substr($content, 0, 3)) ? substr($content, 3) : $content;
if (strpos($content, "\xEF\xBB\xBF") === 0) {
return substr($content, 3);
}
return $content;
}
/**