1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-18 03:41:35 +02:00

do some trivial codestyle fixes

unix newlines, trailing spaces
This commit is contained in:
Elan Ruusamäe
2016-01-22 00:30:38 +02:00
parent 90bf31f53b
commit 379feaba99
40 changed files with 1424 additions and 1327 deletions

View File

@@ -6,11 +6,11 @@
/**
* WinCache-based cache class for Minify
*
*
* <code>
* Minify::setCache(new Minify_Cache_WinCache());
* </code>
*
*
* @package Minify
* @author Matthias Fax
**/
@@ -32,7 +32,7 @@ class Minify_Cache_WinCache implements Minify_CacheInterface
}
$this->_exp = $expire;
}
/**
* Write data to cache.
*
@@ -46,7 +46,7 @@ class Minify_Cache_WinCache implements Minify_CacheInterface
{
return wincache_ucache_set($id, "{$_SERVER['REQUEST_TIME']}|{$data}", $this->_exp);
}
/**
* Get the size of a cache entry
*
@@ -59,9 +59,10 @@ class Minify_Cache_WinCache implements Minify_CacheInterface
if (!$this->_fetch($id)) {
return false;
}
return (function_exists('mb_strlen') && ((int) ini_get('mbstring.func_overload') & 2)) ? mb_strlen($this->_data, '8bit') : strlen($this->_data);
}
/**
* Does a valid cache entry exist?
*
@@ -75,7 +76,7 @@ class Minify_Cache_WinCache implements Minify_CacheInterface
{
return ($this->_fetch($id) && ($this->_lm >= $srcMtime));
}
/**
* Send the cached content to output
*
@@ -85,7 +86,7 @@ class Minify_Cache_WinCache implements Minify_CacheInterface
{
echo $this->_fetch($id) ? $this->_data : '';
}
/**
* Fetch the cached content
*
@@ -97,14 +98,14 @@ class Minify_Cache_WinCache implements Minify_CacheInterface
{
return $this->_fetch($id) ? $this->_data : '';
}
private $_exp = NULL;
// cache of most recently fetched id
private $_lm = NULL;
private $_data = NULL;
private $_id = NULL;
/**
* Fetch data and timestamp from WinCache, store in instance
*
@@ -121,10 +122,12 @@ class Minify_Cache_WinCache implements Minify_CacheInterface
$ret = wincache_ucache_get($id, $suc);
if (!$suc) {
$this->_id = NULL;
return false;
}
list($this->_lm, $this->_data) = explode('|', $ret, 2);
$this->_id = $id;
return true;
}
}