1
0
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:
Elan Ruusamäe
2016-10-16 16:44:58 +03:00
parent 2809e3c2eb
commit 0cc631c5a9
9 changed files with 10 additions and 3 deletions

View File

@@ -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;
} }
} }

View File

@@ -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();
} }

View File

@@ -4,7 +4,6 @@
* @package Minify * @package Minify
*/ */
use Psr\Log\LoggerInterface;
use Monolog\Logger; use Monolog\Logger;
/** /**

View File

@@ -1,6 +1,5 @@
<?php <?php
use Psr\Log\LoggerInterface;
interface Minify_ControllerInterface { interface Minify_ControllerInterface {

View File

@@ -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;
} }

View File

@@ -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;
} }

View File

@@ -42,6 +42,7 @@ class JShrink
self::$defaultOptions, self::$defaultOptions,
$options $options
); );
return \JShrink\Minifier::minify($js, $options); return \JShrink\Minifier::minify($js, $options);
} }
} }

View File

@@ -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);
} }

View File

@@ -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