1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-31 09:31:48 +02:00

last_modified is always integer, no need to check for null

This commit is contained in:
Elan Ruusamäe
2014-09-18 21:51:39 +03:00
parent 4f5cdbb746
commit 6817584513

View File

@@ -17,7 +17,7 @@ class Minify_HTML_Helper {
/** /**
* Get an HTML-escaped Minify URI for a group or set of files * Get an HTML-escaped Minify URI for a group or set of files
* *
* @param string|array $keyOrFiles a group key or array of filepaths/URIs * @param string|array $keyOrFiles a group key or array of filepaths/URIs
* @param array $opts options: * @param array $opts options:
* 'farExpires' : (default true) append a modified timestamp for cache revving * 'farExpires' : (default true) append a modified timestamp for cache revving
@@ -141,7 +141,7 @@ class Minify_HTML_Helper {
$max = $lastModified; $max = $lastModified;
/** @var Minify_Source $source */ /** @var Minify_Source $source */
foreach ((array)$sources as $source) { foreach ((array)$sources as $source) {
if ($source instanceof Minify_Source && $source->getLastModified() !== null) { if ($source instanceof Minify_Source) {
$max = max($max, $source->getLastModified()); $max = max($max, $source->getLastModified());
} elseif (is_object($source) && isset($source->lastModified)) { } elseif (is_object($source) && isset($source->lastModified)) {
$max = max($max, $source->lastModified); $max = max($max, $source->lastModified);
@@ -161,7 +161,7 @@ class Minify_HTML_Helper {
protected $_filePaths = array(); protected $_filePaths = array();
protected $_lastModified = null; protected $_lastModified = null;
/** /**
* In a given array of strings, find the character they all have at * In a given array of strings, find the character they all have at
* a particular index * a particular index
@@ -208,7 +208,7 @@ class Minify_HTML_Helper {
} }
$base = preg_replace('@[^/]+$@', '', $base); $base = preg_replace('@[^/]+$@', '', $base);
$uri = $minRoot . 'f=' . implode(',', $paths); $uri = $minRoot . 'f=' . implode(',', $paths);
if (substr($base, -1) === '/') { if (substr($base, -1) === '/') {
// we have a base dir! // we have a base dir!
$basedPaths = $paths; $basedPaths = $paths;