mirror of
https://github.com/matthiasmullie/minify.git
synced 2025-03-14 20:39:46 +01:00
Reformat
This commit is contained in:
parent
f97aaf34f5
commit
793c6b8365
@ -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());
|
||||
|
@ -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.');
|
||||
}
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user