This commit is contained in:
Matthias Mullie 2023-06-30 14:46:15 +02:00
parent f97aaf34f5
commit 793c6b8365
3 changed files with 8 additions and 11 deletions

View File

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

View File

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

View File

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