Skip to content

Commit

Permalink
.php_cs fix psr2 syntax(and using fixer 2.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
peter279k committed Jan 11, 2017
1 parent cc36d51 commit 808ec2b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 28 deletions.
24 changes: 3 additions & 21 deletions .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,29 @@ For the full copyright and license information, please view
the LICENSE file that was distributed with this source code.
EOF;

$finder = Symfony\CS\Finder\DefaultFinder::create()
$finder = PhpCsFixer\Finder::create()
->files()
->name('*.php')
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
;

/* fabpot/php-cs-fixer:^2.0-dev */
return Symfony\CS\Config\Config::create()
return PhpCsFixer\Config::create()
->setRules(array(
'@PSR2' => true,
'duplicate_semicolon' => true,
'extra_empty_lines' => true,
'header_comment' => array('header' => $header),
'include' => true,
'long_array_syntax' => true,
'method_separation' => true,
'multiline_array_trailing_comma' => true,
'namespace_no_leading_whitespace' => true,
'no_blank_lines_after_class_opening' => true,
'no_empty_lines_after_phpdocs' => true,
'object_operator' => true,
'operators_spaces' => true,
'phpdoc_indent' => true,
'phpdoc_no_access' => true,
'phpdoc_no_package' => true,
'phpdoc_order' => true,
'phpdoc_scalar' => true,
'phpdoc_separation' => true,
'phpdoc_trim' => true,
'phpdoc_type_to_var' => true,
'return' => true,
'remove_leading_slash_use' => true,
'remove_lines_between_uses' => true,
'single_array_no_trailing_comma' => true,
'single_blank_line_before_namespace' => true,
'spaces_cast' => true,
'standardize_not_equal' => true,
'ternary_spaces' => true,
'unused_use' => true,
'whitespacy_lines' => true,
))
->finder($finder)
->setFinder($finder)
;
2 changes: 0 additions & 2 deletions .styleci.yml

This file was deleted.

8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ php:

matrix:
fast_finish: true
allow_failures:
- php: hhvm

before_script:
- rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
- composer install --no-interaction --no-progress --prefer-dist

script:
- vendor/bin/phpunit
- vendor/bin/phpunit --coverage-clover=coverage.xml

after_success:
- bash <(curl -s https://codecov.io/bash)
2 changes: 1 addition & 1 deletion tests/Constraint/AbstractConstraintTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ public function testAbstractConstraintWithDeprecated()

$this->assertSame($expectedString, $result);
}
}
}
2 changes: 1 addition & 1 deletion tests/Constraint/EmptyConstraintTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ public function testGetPrettyString()

$this->assertSame($expectedString, $result);
}
}
}
1 change: 0 additions & 1 deletion tests/Constraint/MultiConstraintTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class MultiConstraintTest extends \PHPUnit_Framework_TestCase
protected $versionRequireStart;
protected $versionRequireEnd;


protected function setUp()
{
$this->multiConstraint = new MultiConstraint(array());
Expand Down

0 comments on commit 808ec2b

Please sign in to comment.