Skip to content

Commit

Permalink
Merge pull request #21 from usernane/dev
Browse files Browse the repository at this point in the history
Added CS Fixer Checks
  • Loading branch information
usernane authored Mar 14, 2020
2 parents f7e1402 + efaf491 commit 772cc2d
Show file tree
Hide file tree
Showing 21 changed files with 5,685 additions and 5,181 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/nbproject
/nbproject
/vendor
92 changes: 92 additions & 0 deletions php_cs.php.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?php

$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__)
;

return PhpCsFixer\Config::create()
->setRules([
'align_multiline_comment' => [
'comment_type' => 'phpdocs_only'
],
'array_indentation' => [],
'array_syntax' => [
'syntax' => 'short'
],
'binary_operator_spaces' => [
'default' => 'single_space'
],
'blank_line_before_statement' => [
'statements' => [
'if','return','while','for','foreach','do'
]
],
'blank_line_after_opening_tag' => true,
'blank_line_after_namespace' => true,
'elseif' => false,
'explicit_string_variable' => false,
'full_opening_tag' => true,
'fully_qualified_strict_types' => true,
'line_ending' => true,
'linebreak_after_opening_tag' => true,
'lowercase_cast' => true,
'lowercase_keywords' => true,
'lowercase_static_reference' => true,
'no_alternative_syntax' => true,
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'no_blank_lines_before_namespace' => true,
'no_closing_tag' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_multiline_whitespace_around_double_arrow' => true,
'no_spaces_after_function_name' => true,
'no_spaces_inside_parenthesis' => true,
'no_unused_imports' => true,
'single_import_per_statement' => true,
'single_blank_line_at_eof' => true,
'no_whitespace_in_blank_line' => true,
'not_operator_with_space' => false,
'ordered_imports' => [
'sort_algorithm' => 'alpha'
],
'ordered_class_elements' => [
'sortAlgorithm' => 'alpha',
'order' => [
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
'property_private',
'construct',
'method_public',
'method_private'
]
],
'no_mixed_echo_print' => [
'use' => 'echo'
],
'constant_case' => [
'case' => 'lower'
],
'increment_style' => [
'style' => 'post'
],
'concat_space' => [
'spacing' => 'none'
],
'braces' => [
'allow_single_line_closure' => false,
'position_after_functions_and_oop_constructs' => 'same',
'position_after_anonymous_constructs' => 'next',
'position_after_control_structures' => 'same'
],
'class_definition' => [
'single_line' => true
]
])
->setFinder($finder)
;
Loading

0 comments on commit 772cc2d

Please sign in to comment.