Skip to content

Commit

Permalink
simplify return statement
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Jan 5, 2018
1 parent f9c96b6 commit c580d24
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Minify/Source.php
Expand Up @@ -180,8 +180,13 @@ public function getContent()
} 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;
}

/**
Expand Down

0 comments on commit c580d24

Please sign in to comment.