Skip to content

Commit ef3e867

Browse files
nckgStyleCIBot
authored andcommitted
Applied fixes from StyleCI
1 parent 48f1ee3 commit ef3e867

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

src/Middleware/MinifyResponse.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
43
namespace Nckg\Minify\Middleware;
54

65
use Closure;
@@ -11,17 +10,18 @@ class MinifyResponse
1110
/**
1211
* Handle an incoming request.
1312
*
14-
* @param \Illuminate\Http\Request $request
15-
* @param \Closure $next
13+
* @param \Illuminate\Http\Request $request
14+
* @param \Closure $next
15+
*
1616
* @return mixed
1717
*/
1818
public function handle($request, Closure $next)
1919
{
2020
/** @var Response $response */
2121
$response = $next($request);
2222

23-
if (! app()->isLocal()) {
24-
$response->setContent((new Minifier)->html($response->getContent()));
23+
if (!app()->isLocal()) {
24+
$response->setContent((new Minifier())->html($response->getContent()));
2525
}
2626

2727
return $response;

src/Minifier.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class Minifier
1717

1818
/**
1919
* @param string $html
20+
*
2021
* @return string
2122
*/
2223
public function html(string $html): string
@@ -25,4 +26,4 @@ public function html(string $html): string
2526

2627
return $output;
2728
}
28-
}
29+
}

tests/MinifierTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
43
namespace Nckg\Minify\Test;
54

65
use Nckg\Minify\Minifier;
@@ -49,8 +48,8 @@ public function it_removes_comments()
4948
/** @test */
5049
public function it_minifies_an_entire_page_correct()
5150
{
52-
$string = file_get_contents(__DIR__ . '/_data/page.html');
53-
$expected = file_get_contents(__DIR__ . '/_data/page-minified.html');
51+
$string = file_get_contents(__DIR__.'/_data/page.html');
52+
$expected = file_get_contents(__DIR__.'/_data/page-minified.html');
5453
$this->assertMinifiedString($expected, $string);
5554
}
5655

@@ -63,4 +62,4 @@ protected function assertMinifiedString($expected, $string)
6362
$minifier = new Minifier();
6463
$this->assertSame($expected, $minifier->html($string));
6564
}
66-
}
65+
}

tests/TestCase.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<?php
22

3-
43
namespace Nckg\Minify\Test;
54

65
use Orchestra\Testbench\TestCase as Orchestra;
76

87
abstract class TestCase extends Orchestra
98
{
10-
11-
}
9+
}

0 commit comments

Comments
 (0)