mirror of
https://github.com/mrclay/minify.git
synced 2025-07-31 19:30:29 +02: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:
@@ -497,6 +497,7 @@ class Minify {
|
|||||||
$content = substr($content, 3);
|
$content = substr($content, 3);
|
||||||
}
|
}
|
||||||
$content = str_replace("\r\n", "\n", $content);
|
$content = str_replace("\r\n", "\n", $content);
|
||||||
|
|
||||||
return trim($content);
|
return trim($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -721,6 +722,7 @@ class Minify {
|
|||||||
$this->logger && $this->logger->warning('ContentType mismatch');
|
$this->logger && $this->logger->warning('ContentType mismatch');
|
||||||
|
|
||||||
$this->sources = array();
|
$this->sources = array();
|
||||||
|
|
||||||
return $options;
|
return $options;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -734,6 +736,7 @@ class Minify {
|
|||||||
$this->logger && $this->logger->warning('ContentType mismatch');
|
$this->logger && $this->logger->warning('ContentType mismatch');
|
||||||
|
|
||||||
$this->sources = array();
|
$this->sources = array();
|
||||||
|
|
||||||
return $options;
|
return $options;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -64,6 +64,7 @@ class Minify_Cache_File implements Minify_CacheInterface {
|
|||||||
if ($data !== $this->fetch($id)) {
|
if ($data !== $this->fetch($id)) {
|
||||||
@unlink($file);
|
@unlink($file);
|
||||||
$this->logger->warning("Minify_Cache_File: Post-write read failed for '$file'");
|
$this->logger->warning("Minify_Cache_File: Post-write read failed for '$file'");
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,6 +161,7 @@ class Minify_Cache_File implements Minify_CacheInterface {
|
|||||||
public static function tmp()
|
public static function tmp()
|
||||||
{
|
{
|
||||||
trigger_error(__METHOD__ . ' is deprecated in Minfy 3.0', E_USER_DEPRECATED);
|
trigger_error(__METHOD__ . ' is deprecated in Minfy 3.0', E_USER_DEPRECATED);
|
||||||
|
|
||||||
return sys_get_temp_dir();
|
return sys_get_temp_dir();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4,7 +4,6 @@
|
|||||||
* @package Minify
|
* @package Minify
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Psr\Log\LoggerInterface;
|
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Psr\Log\LoggerInterface;
|
|
||||||
|
|
||||||
interface Minify_ControllerInterface {
|
interface Minify_ControllerInterface {
|
||||||
|
|
||||||
|
@@ -97,6 +97,7 @@ class Minify_Env {
|
|||||||
if (substr($path, 1, 1) === ':') {
|
if (substr($path, 1, 1) === ':') {
|
||||||
$path = lcfirst($path);
|
$path = lcfirst($path);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $path;
|
return $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -168,11 +168,13 @@ class Minify_HTML_Helper {
|
|||||||
static $cached;
|
static $cached;
|
||||||
if ($app) {
|
if ($app) {
|
||||||
$cached = $app;
|
$cached = $app;
|
||||||
|
|
||||||
return $app;
|
return $app;
|
||||||
}
|
}
|
||||||
if ($cached === null) {
|
if ($cached === null) {
|
||||||
$cached = (require __DIR__ . '/../../../bootstrap.php');
|
$cached = (require __DIR__ . '/../../../bootstrap.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $cached;
|
return $cached;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -42,6 +42,7 @@ class JShrink
|
|||||||
self::$defaultOptions,
|
self::$defaultOptions,
|
||||||
$options
|
$options
|
||||||
);
|
);
|
||||||
|
|
||||||
return \JShrink\Minifier::minify($js, $options);
|
return \JShrink\Minifier::minify($js, $options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -145,6 +145,7 @@ class Minify_Lines {
|
|||||||
$line = $inComment
|
$line = $inComment
|
||||||
? '/* ' . str_pad($note, $padTo, ' ', STR_PAD_RIGHT) . ' *| ' . $line
|
? '/* ' . str_pad($note, $padTo, ' ', STR_PAD_RIGHT) . ' *| ' . $line
|
||||||
: '/* ' . str_pad($note, $padTo, ' ', STR_PAD_RIGHT) . ' */ ' . $line;
|
: '/* ' . str_pad($note, $padTo, ' ', STR_PAD_RIGHT) . ' */ ' . $line;
|
||||||
|
|
||||||
return rtrim($line);
|
return rtrim($line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace Minify\Logger;
|
namespace Minify\Logger;
|
||||||
|
|
||||||
use Monolog\Logger;
|
|
||||||
use Monolog\Handler\AbstractProcessingHandler;
|
use Monolog\Handler\AbstractProcessingHandler;
|
||||||
|
|
||||||
class LegacyHandler extends AbstractProcessingHandler
|
class LegacyHandler extends AbstractProcessingHandler
|
||||||
|
Reference in New Issue
Block a user