Skip to content

Commit

Permalink
add php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
chregu committed Dec 3, 2017
1 parent 2c677b1 commit af78ed6
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/vendor
/bin
/composer.lock
/.php_cs.cache
29 changes: 29 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => array('syntax' => 'short'),
'combine_consecutive_unsets' => true,
'heredoc_to_nowdoc' => true,
'no_extra_consecutive_blank_lines' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'],
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'psr4' => true,
'strict_param' => true,
])
->setFinder(
PhpCsFixer\Finder::create()
->notPath('src/AppBundle/Command/TestCommand.php')
->exclude('tests/*/Fixtures')
->exclude('var')
->in(__DIR__)
)
;
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* ext/vips 1.0.8 is required. Throw exceptions in methods, which needs vips 8.6.
* Add constructor config array to be able to set `vips_cache_set_max_mem` et al.
* Fix paste method to work with future php-vips versions
* Added php-cs-fixer

### 0.0.4 (2017-11-27)

Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,8 @@
"imagine-*.phar",
"composer.phar"
]
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.8"
}
}

0 comments on commit af78ed6

Please sign in to comment.