Skip to content

Commit 9ddadb8

Browse files
Reformat
1 parent cd306fc commit 9ddadb8

15 files changed

+34
-53
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@
1111
/makefile export-ignore
1212
/phpunit.xml export-ignore
1313
/README.md export-ignore
14-
/ruleset.xml.dist export-ignore

.php-cs-fixer.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
return $config
1010
->setRules(array(
1111
'@Symfony' => true,
12+
'@PER-CS' => true,
1213
'array_syntax' => array('syntax' => 'long'),
14+
'concat_space' => array('spacing' => 'one'),
1315
'single_line_throw' => false,
1416
'yoda_style' => array('equal' => false, 'identical' => false, 'less_and_greater' => false),
15-
'@PSR12' => true,
16-
'class_definition' => false, // @see https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/5463
1717
'visibility_required' => array('elements' => array('property', 'method')),
18+
'phpdoc_align' => array('align' => 'left'),
19+
'trailing_comma_in_multiline' => array('elements' => array('arrays')),
1820
))
1921
->setFinder($finder)
2022
->setUsingCache(false);

composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@
1919
"matthiasmullie/path-converter": "~1.1"
2020
},
2121
"require-dev": {
22-
"friendsofphp/php-cs-fixer": ">=2.0",
22+
"friendsofphp/php-cs-fixer": ">=3.0",
2323
"matthiasmullie/scrapbook": ">=1.3",
24-
"phpunit/phpunit": ">=4.8",
25-
"squizlabs/php_codesniffer": ">=3.0"
24+
"phpunit/phpunit": ">=4.8"
2625
},
2726
"suggest": {
2827
"psr/cache-implementation": "Cache implementation to use with Minify::cache"

makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PHP ?=
22
TEST ?=
3-
VOLUME_BINDS ?= src,tests,build,.php-cs-fixer.php,phpunit.xml,ruleset.xml
3+
VOLUME_BINDS ?= src,tests,build,.php-cs-fixer.php,phpunit.xml
44

55
docs:
66
docker run --rm -v $$(pwd)/src:/data/src -v $$(pwd)/docs:/data/docs -w /data php:cli bash -c "\
@@ -18,6 +18,6 @@ format:
1818
VOLUMES=""
1919
for VOLUME in $$(echo "$(VOLUME_BINDS)" | tr "," "\n"); do VOLUMES="$$VOLUMES -v $$(pwd)/$$VOLUME:/var/www/$$VOLUME"; done;\
2020
test $$(docker images -q matthiasmullie/minify:cli) || docker build -t matthiasmullie/minify:cli .;\
21-
docker run $$VOLUMES matthiasmullie/minify:cli sh -c "PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix && vendor/bin/phpcbf --standard=ruleset.xml"
21+
docker run $$VOLUMES matthiasmullie/minify:cli sh -c "PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix"
2222

2323
.PHONY: docs

ruleset.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/CSS.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ protected function moveImportsToTop($content)
109109
* \@import's will be loaded and their content merged into the original file,
110110
* to save HTTP requests.
111111
*
112-
* @param string $source The file to combine imports for
113-
* @param string $content The CSS content to combine imports for
112+
* @param string $source The file to combine imports for
113+
* @param string $content The CSS content to combine imports for
114114
* @param string[] $parents Parent paths, for circular reference checks
115115
*
116116
* @return string
@@ -245,7 +245,7 @@ protected function combineImports($source, $content, $parents)
245245
* @url(image.jpg) images will be loaded and their content merged into the
246246
* original file, to save HTTP requests.
247247
*
248-
* @param string $source The file to import files for
248+
* @param string $source The file to import files for
249249
* @param string $content The CSS content to import files for
250250
*
251251
* @return string
@@ -357,7 +357,7 @@ public function execute($path = null, $parents = array())
357357
* (e.g. ../../images/image.gif, if the new CSS file is 1 folder deeper).
358358
*
359359
* @param ConverterInterface $converter Relative path converter
360-
* @param string $content The CSS content to update relative urls for
360+
* @param string $content The CSS content to update relative urls for
361361
*
362362
* @return string
363363
*/
@@ -590,6 +590,7 @@ protected function convertLegacyColors($content)
590590

591591
// convert `rgb` to `hex`
592592
$dec = '([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])';
593+
593594
return preg_replace_callback(
594595
"/rgb\($dec $dec $dec\)/i",
595596
function ($match) {

src/Exception.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@
1717
*
1818
* @author Matthias Mullie <minify@mullie.eu>
1919
*/
20-
abstract class Exception extends \Exception
21-
{
22-
}
20+
abstract class Exception extends \Exception {}

src/Exceptions/BasicException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,4 @@
1919
*
2020
* @author Matthias Mullie <minify@mullie.eu>
2121
*/
22-
abstract class BasicException extends Exception
23-
{
24-
}
22+
abstract class BasicException extends Exception {}

src/Exceptions/FileImportException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@
1717
*
1818
* @author Matthias Mullie <minify@mullie.eu>
1919
*/
20-
class FileImportException extends BasicException
21-
{
22-
}
20+
class FileImportException extends BasicException {}

src/Exceptions/IOException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@
1717
*
1818
* @author Matthias Mullie <minify@mullie.eu>
1919
*/
20-
class IOException extends BasicException
21-
{
22-
}
20+
class IOException extends BasicException {}

0 commit comments

Comments
 (0)