1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-13 01:24:51 +02:00

Big style cleanup

This commit is contained in:
Steve Clay
2016-10-16 15:13:38 -04:00
parent 5fb7ea1ed1
commit 16c811cd93
23 changed files with 257 additions and 266 deletions

View File

@@ -62,9 +62,11 @@ class Minify_Cache_Memcache implements Minify_CacheInterface
return false;
}
return (function_exists('mb_strlen') && ((int)ini_get('mbstring.func_overload') & 2))
? mb_strlen($this->_data, '8bit')
: strlen($this->_data);
if (function_exists('mb_strlen') && ((int)ini_get('mbstring.func_overload') & 2)) {
return mb_strlen($this->_data, '8bit');
} else {
return strlen($this->_data);
}
}
/**
@@ -88,9 +90,7 @@ class Minify_Cache_Memcache implements Minify_CacheInterface
*/
public function display($id)
{
echo $this->_fetch($id)
? $this->_data
: '';
echo $this->_fetch($id) ? $this->_data : '';
}
/**
@@ -102,9 +102,7 @@ class Minify_Cache_Memcache implements Minify_CacheInterface
*/
public function fetch($id)
{
return $this->_fetch($id)
? $this->_data
: '';
return $this->_fetch($id) ? $this->_data : '';
}
private $_mc = null;
@@ -127,12 +125,14 @@ class Minify_Cache_Memcache implements Minify_CacheInterface
if ($this->_id === $id) {
return true;
}
$ret = $this->_mc->get($id);
if (false === $ret) {
$this->_id = null;
return false;
}
list($this->_lm, $this->_data) = explode('|', $ret, 2);
$this->_id = $id;