Skip to content

Commit d48a09c

Browse files
committed
update php-cs-fixer package version, apply php-cs-fixer
1 parent 25336e1 commit d48a09c

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

.php_cs

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

3-
$finder = Symfony\CS\Finder\DefaultFinder::create()
3+
$finder = PhpCsFixer\Finder::create()
44
->exclude('vendor')
5-
->exclude('Tests/resources')
5+
->exclude('tests')
66
->in(__DIR__);
77

8-
return Symfony\CS\Config\Config::create()
9-
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
10-
->finder($finder);
8+
return PhpCsFixer\Config::create()
9+
->setUsingCache(false)
10+
->setRules(array(
11+
'@PSR2' => true,
12+
'binary_operator_spaces' => true,
13+
'no_whitespace_in_blank_line' => true,
14+
'ternary_operator_spaces' => true,
15+
'cast_spaces' => true,
16+
'trailing_comma_in_multiline_array' => true
17+
))
18+
->setFinder($finder);

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"php" : ">=5.3.3"
2525
},
2626
"require-dev": {
27-
"fabpot/php-cs-fixer": "~1.8"
27+
"friendsofphp/php-cs-fixer": "~2.0"
2828
},
2929
"autoload": {
3030
"psr-4": {

src/AbstractStructBase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public static function __set_state(array $array)
1515
{
1616
$className = get_called_class();
1717
$object = @new $className();
18-
foreach ($array as $name=>$value) {
18+
foreach ($array as $name => $value) {
1919
$object->_set($name, $value);
2020
}
2121
return $object;

0 commit comments

Comments
 (0)