aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2017-08-21 10:21:51 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2017-08-21 10:21:51 +0200
commit746550ff5592c15b20b3aaaff34d409a7a06c936 (patch)
treed8cbe067ca42ac49e5b3c83701f0759f23e04846
parent3f57ff22be51a380a6118915def592c5c8feac14 (diff)
downloadDevtools-746550ff5592c15b20b3aaaff34d409a7a06c936.zip
Devtools-746550ff5592c15b20b3aaaff34d409a7a06c936.tar.gz
Devtools-746550ff5592c15b20b3aaaff34d409a7a06c936.tar.bz2
feat(cs) Add PHP 7.* rules.
-rw-r--r--Resource/PHPCSFixer/ConfigurationFile.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/Resource/PHPCSFixer/ConfigurationFile.php b/Resource/PHPCSFixer/ConfigurationFile.php
index 8225817..b36310a 100644
--- a/Resource/PHPCSFixer/ConfigurationFile.php
+++ b/Resource/PHPCSFixer/ConfigurationFile.php
@@ -61,18 +61,25 @@ foreach ($fixers as $fixer) {
return
$out->setRules([
'@PSR2' => true,
+ 'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => true],
'blank_line_after_opening_tag' => true,
+ 'cast_spaces' => true,
'concat_space' => ['spacing' => 'one'],
+ 'declare_strict_types' => true,
'no_blank_lines_after_class_opening' => true,
- 'ordered_imports' => true,
- 'phpdoc_no_access' => true,
'no_leading_import_slash' => true,
- 'self_accessor' => true,
- 'array_syntax' => ['syntax' => 'short'],
- 'cast_spaces' => true,
'no_unused_imports' => true,
'no_whitespace_in_blank_line' => true,
+ 'ordered_imports' => true,
+ 'phpdoc_no_access' => true,
+ 'pow_to_exponentiation' => true,
+ 'random_api_migration' => true,
+ 'return_type_declaration' => ['space_before' => 'none'],
+ 'self_accessor' => true,
+ 'ternary_to_null_coalescing' => true,
+ 'visibility_required' => ['elements' => ['const', 'property', 'method']],
+ 'void_return' => true,
// Hoa defined
'Hoa/author' => true,