From 746550ff5592c15b20b3aaaff34d409a7a06c936 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Mon, 21 Aug 2017 10:21:51 +0200 Subject: [PATCH] feat(cs) Add PHP 7.* rules. --- Resource/PHPCSFixer/ConfigurationFile.php | 17 ++++++++++++----- 1 file 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 @@ 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,