Skip to content

Commit e81c177

Browse files
CS fixes
1 parent 4122e15 commit e81c177

File tree

10 files changed

+31
-30
lines changed

10 files changed

+31
-30
lines changed

src/HTMLMinServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,13 @@ protected function registerHTMLMin()
212212
*/
213213
public function provides()
214214
{
215-
return array(
215+
return [
216216
'htmlmin',
217217
'htmlmin.js',
218218
'htmlmin.css',
219219
'htmlmin.html',
220220
'htmlmin.blade',
221221
'htmlmin.compiler',
222-
);
222+
];
223223
}
224224
}

src/Minifiers/BladeMinifier.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ public function __construct($force)
5757
public function render($value)
5858
{
5959
if ($this->shouldMinify($value)) {
60-
$replace = array(
60+
$replace = [
6161
'/<!--[^\[](.*?)[^\]]-->/s' => '',
62-
"/<\?php/" => '<?php ',
63-
"/\n([\S])/" => ' $1',
64-
"/\r/" => '',
65-
"/\n/" => '',
66-
"/\t/" => ' ',
67-
"/ +/" => ' ',
68-
);
62+
"/<\?php/" => '<?php ',
63+
"/\n([\S])/" => ' $1',
64+
"/\r/" => '',
65+
"/\n/" => '',
66+
"/\t/" => ' ',
67+
"/ +/" => ' ',
68+
];
6969

7070
$value = preg_replace(array_keys($replace), array_values($replace), $value);
7171
}

src/Minifiers/CssMinifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ class CssMinifier implements MinifierInterface
3636
*/
3737
public function render($value)
3838
{
39-
return Minify_CSS::minify($value, array('preserveComments' => false));
39+
return Minify_CSS::minify($value, ['preserveComments' => false]);
4040
}
4141
}

src/Minifiers/HtmlMinifier.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ public function __construct(CssMinifier $css, JsMinifier $js)
6464
*/
6565
public function render($value)
6666
{
67-
$options = array(
67+
$options = [
6868
'cssMinifier' => function ($css) {
6969
return $this->css->render($css);
7070
},
7171
'jsMinifier' => function ($js) {
7272
return $this->js->render($js);
7373
},
7474
'jsCleanComments' => true,
75-
);
75+
];
7676

7777
return Minify_HTML::minify($value, $options);
7878
}

src/config/config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
return array(
17+
return [
1818

1919
/*
2020
|--------------------------------------------------------------------------
@@ -68,4 +68,4 @@
6868

6969
'live' => false,
7070

71-
);
71+
];

tests/Functional/AbstractFunctionalTestCase.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ protected function normalize($string)
3939
$string = str_replace("\r\n", "\n", $string);
4040
$string = str_replace("\r", "\n", $string);
4141
$string = preg_replace("/\n{2,}/", "\n\n", $string);
42+
4243
return rtrim($string);
4344
}
4445

tests/Functional/FilterEnabledTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ public function testNewSetup()
3939
{
4040
$this->app['view']->addNamespace('stubs', realpath(__DIR__.'/stubs'));
4141

42-
$this->app['router']->get('htmlmin-test-route', array('after' => 'htmlmin', function () {
42+
$this->app['router']->get('htmlmin-test-route', ['after' => 'htmlmin', function () {
4343
return $this->app['view']->make('stubs::test');
44-
}));
44+
}]);
4545

4646
$actual = $this->call('GET', 'htmlmin-test-route')->getContent();
4747

tests/Functional/LiveEnabledTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function testRedirect()
7979
public function testJson()
8080
{
8181
$this->app['router']->get('htmlmin-test-route', function () {
82-
return Response::json(array('foo' => 'bar', array('baz')), 200, array(), JSON_PRETTY_PRINT);
82+
return Response::json(['foo' => 'bar', ['baz']], 200, [], JSON_PRETTY_PRINT);
8383
});
8484

8585
$actual = $this->call('GET', 'htmlmin-test-route')->getContent();

tests/HTMLMinTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ class HTMLMinTest extends AbstractTestBenchTestCase
3333
{
3434
public function methodProvider()
3535
{
36-
return array(
37-
array('blade', 'getBladeMinifier'),
38-
array('css', 'getCssMinifier'),
39-
array('js', 'getJsMinifier'),
40-
array('html', 'getHtmlMinifier'),
41-
);
36+
return [
37+
['blade', 'getBladeMinifier'],
38+
['css', 'getCssMinifier'],
39+
['js', 'getJsMinifier'],
40+
['html', 'getHtmlMinifier'],
41+
];
4242
}
4343

4444
/**
@@ -85,7 +85,7 @@ public function testLiveJson()
8585
{
8686
$htmlmin = $this->getHTMLMin();
8787

88-
$content = array('<p>123</p> <p>123</p>');
88+
$content = ['<p>123</p> <p>123</p>'];
8989

9090
$response = new Response($content);
9191

tests/Minifiers/BladeMinifierTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ public function testRenderEnabled()
4343

4444
public function tagProvider()
4545
{
46-
return array(
47-
array('textarea'),
48-
array('pre'),
49-
array('code'),
50-
);
46+
return [
47+
['textarea'],
48+
['pre'],
49+
['code'],
50+
];
5151
}
5252

5353
/**

0 commit comments

Comments
 (0)