protected function should_gzip_file($file_path, $type) { $mimes = $this->get_mime_types_to_gzip(true); if (in_array($type, $mimes) && is_readable($file_path)) { return true; } return false; }