mirror of
https://github.com/mrclay/minify.git
synced 2025-01-17 21:28:14 +01:00
php-cs fixes
1) Minify.php (return) 2) Minify/Env.php (return) 3) Minify/JS/JShrink.php (return) 4) Minify/HTML/Helper.php (return) 5) Minify/Logger/LegacyHandler.php (unused_use) 6) Minify/Lines.php (return) 7) Minify/Controller/Files.php (unused_use) 8) Minify/ControllerInterface.php (unused_use) 9) Minify/Cache/File.php (return)
This commit is contained in:
parent
2809e3c2eb
commit
0cc631c5a9
@ -497,6 +497,7 @@ class Minify {
|
||||
$content = substr($content, 3);
|
||||
}
|
||||
$content = str_replace("\r\n", "\n", $content);
|
||||
|
||||
return trim($content);
|
||||
}
|
||||
|
||||
@ -721,6 +722,7 @@ class Minify {
|
||||
$this->logger && $this->logger->warning('ContentType mismatch');
|
||||
|
||||
$this->sources = array();
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
@ -734,6 +736,7 @@ class Minify {
|
||||
$this->logger && $this->logger->warning('ContentType mismatch');
|
||||
|
||||
$this->sources = array();
|
||||
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
|
@ -64,6 +64,7 @@ class Minify_Cache_File implements Minify_CacheInterface {
|
||||
if ($data !== $this->fetch($id)) {
|
||||
@unlink($file);
|
||||
$this->logger->warning("Minify_Cache_File: Post-write read failed for '$file'");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -160,6 +161,7 @@ class Minify_Cache_File implements Minify_CacheInterface {
|
||||
public static function tmp()
|
||||
{
|
||||
trigger_error(__METHOD__ . ' is deprecated in Minfy 3.0', E_USER_DEPRECATED);
|
||||
|
||||
return sys_get_temp_dir();
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
* @package Minify
|
||||
*/
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Monolog\Logger;
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
interface Minify_ControllerInterface {
|
||||
|
||||
|
@ -97,6 +97,7 @@ class Minify_Env {
|
||||
if (substr($path, 1, 1) === ':') {
|
||||
$path = lcfirst($path);
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
|
@ -168,11 +168,13 @@ class Minify_HTML_Helper {
|
||||
static $cached;
|
||||
if ($app) {
|
||||
$cached = $app;
|
||||
|
||||
return $app;
|
||||
}
|
||||
if ($cached === null) {
|
||||
$cached = (require __DIR__ . '/../../../bootstrap.php');
|
||||
}
|
||||
|
||||
return $cached;
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,7 @@ class JShrink
|
||||
self::$defaultOptions,
|
||||
$options
|
||||
);
|
||||
|
||||
return \JShrink\Minifier::minify($js, $options);
|
||||
}
|
||||
}
|
||||
|
@ -145,6 +145,7 @@ class Minify_Lines {
|
||||
$line = $inComment
|
||||
? '/* ' . str_pad($note, $padTo, ' ', STR_PAD_RIGHT) . ' *| ' . $line
|
||||
: '/* ' . str_pad($note, $padTo, ' ', STR_PAD_RIGHT) . ' */ ' . $line;
|
||||
|
||||
return rtrim($line);
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace Minify\Logger;
|
||||
|
||||
use Monolog\Logger;
|
||||
use Monolog\Handler\AbstractProcessingHandler;
|
||||
|
||||
class LegacyHandler extends AbstractProcessingHandler
|
||||
|
Loading…
x
Reference in New Issue
Block a user