From 793c6b8365d69a802cc407c7811cd09cf867231a Mon Sep 17 00:00:00 2001 From: Matthias Mullie Date: Fri, 30 Jun 2023 14:46:15 +0200 Subject: [PATCH] Reformat --- src/JS.php | 3 --- src/Minify.php | 12 ++++++------ tests/CompatTestCase.php | 4 ++-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/JS.php b/src/JS.php index d592b08..9cf43a2 100644 --- a/src/JS.php +++ b/src/JS.php @@ -122,9 +122,6 @@ class JS extends Minify */ protected $operatorsAfter = array(); - /** - * {@inheritdoc} - */ public function __construct() { call_user_func_array(array('\\MatthiasMullie\Minify\\Minify', '__construct'), func_get_args()); diff --git a/src/Minify.php b/src/Minify.php index f77478b..29de517 100644 --- a/src/Minify.php +++ b/src/Minify.php @@ -270,7 +270,7 @@ abstract class Minify $minifier = $this; $callback = function ($match) use ($minifier) { $count = count($minifier->extracted); - $placeholder = '/*'.$count.'*/'; + $placeholder = '/*' . $count . '*/'; $minifier->extracted[$placeholder] = $match[0]; return $placeholder; @@ -494,9 +494,9 @@ abstract class Minify $parsed = parse_url($path); if ( // file is elsewhere - isset($parsed['host']) || + isset($parsed['host']) // file responds to queries (may change, or need to bypass cache) - isset($parsed['query']) + || isset($parsed['query']) ) { return false; } @@ -534,9 +534,9 @@ abstract class Minify protected function writeToFile($handler, $content, $path = '') { if ( - !is_resource($handler) || - ($result = @fwrite($handler, $content)) === false || - ($result < strlen($content)) + !is_resource($handler) + || ($result = @fwrite($handler, $content)) === false + || ($result < strlen($content)) ) { throw new IOException('The file "' . $path . '" could not be written to. Check your disk space and file permissions.'); } diff --git a/tests/CompatTestCase.php b/tests/CompatTestCase.php index acabfc5..698d93b 100644 --- a/tests/CompatTestCase.php +++ b/tests/CompatTestCase.php @@ -5,8 +5,8 @@ namespace MatthiasMullie\Minify\Tests; use PHPUnit\Framework\TestCase as PHPUnitTestCase; if ( - method_exists('PHPUnit\\Framework\\TestCase', 'expectException') || - !method_exists('PHPUnit\\Framework\\TestCase', 'setExpectedException') + method_exists('PHPUnit\\Framework\\TestCase', 'expectException') + || !method_exists('PHPUnit\\Framework\\TestCase', 'setExpectedException') ) { class CompatTestCase extends PHPUnitTestCase {