mirror of
https://github.com/mrclay/minify.git
synced 2025-08-18 03:41:35 +02:00
Test fixes
This commit is contained in:
@@ -122,7 +122,7 @@ class App extends Container
|
||||
|
||||
$type = $that->typeOf($ctrl);
|
||||
throw new RuntimeException('$min_factories["controller"] callable must return an implementation'
|
||||
." of Minify_CacheInterface. Returned $type");
|
||||
. " of Minify_CacheInterface. Returned $type");
|
||||
};
|
||||
|
||||
$this->docRoot = function (App $app) {
|
||||
@@ -188,7 +188,7 @@ class App extends Container
|
||||
|
||||
$type = $that->typeOf($value);
|
||||
throw new RuntimeException('If set, $min_errorLogger must be a PSR-3 logger or a Monolog handler.'
|
||||
." Given $type");
|
||||
. " Given $type");
|
||||
};
|
||||
|
||||
$this->minify = function (App $app) use ($that) {
|
||||
@@ -205,7 +205,7 @@ class App extends Container
|
||||
|
||||
$type = $that->typeOf($minify);
|
||||
throw new RuntimeException('$min_factories["minify"] callable must return a Minify object.'
|
||||
." Returned $type");
|
||||
. " Returned $type");
|
||||
};
|
||||
|
||||
$this->serveOptions = function (App $app) {
|
||||
@@ -232,7 +232,7 @@ class App extends Container
|
||||
}
|
||||
|
||||
// check for URI versioning
|
||||
if ($env->get('v') !== null || preg_match('/&\\d/', $app->env->server('QUERY_STRING'))) {
|
||||
if ($env->get('v') !== null || preg_match('/&\\d/', $app->env->server('QUERY_STRING') ?? '')) {
|
||||
$ret['maxAge'] = 31536000;
|
||||
}
|
||||
|
||||
|
@@ -188,7 +188,7 @@ class Minify_ClosureCompiler
|
||||
*/
|
||||
protected function checkTempdir($tempDir)
|
||||
{
|
||||
if (!is_dir($tempDir)) {
|
||||
if ($tempDir === null || !is_dir($tempDir)) {
|
||||
throw new Minify_ClosureCompiler_Exception('$tempDir(' . $tempDir . ') is not a valid direcotry.');
|
||||
}
|
||||
if (!is_writable($tempDir)) {
|
||||
|
@@ -156,8 +156,8 @@ class Minify_ScssCssSource extends Minify_Source
|
||||
$elapsed = round((microtime(true) - $start), 4);
|
||||
|
||||
$v = Version::VERSION;
|
||||
$ts = date('r', $start);
|
||||
$css = "/* compiled by scssphp $v on $ts (${elapsed}s) */\n\n" . $css;
|
||||
$ts = date('r', (int) $start);
|
||||
$css = "/* compiled by scssphp $v on $ts ({$elapsed}s) */\n\n" . $css;
|
||||
|
||||
$imports = $scss->getParsedFiles();
|
||||
|
||||
|
Reference in New Issue
Block a user