Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.30 KB | None | 0 0
  1. <?php
  2.  
  3. return PhpCsFixer\Config::create()
  4.   ->setIndent('  ')
  5.   ->setLineEnding("\n")
  6.   ->setRules([
  7.     '@Symfony' => true,
  8.     'indentation_type' => true,
  9.     'array_indentation' => true,
  10.     'array_syntax' => ['syntax' => 'short'],
  11.     // 'dir_constant' => true,
  12.     'heredoc_to_nowdoc' => true,
  13.     'linebreak_after_opening_tag' => true,
  14.     // 'modernize_types_casting' => true,
  15.     'semicolon_after_instruction' => true,
  16.     'align_multiline_comment' => true,
  17.     'doctrine_annotation_array_assignment' => true,
  18.     'general_phpdoc_annotation_remove' => true,
  19.     'list_syntax' => true,
  20.     'single_line_comment_style' => true,
  21.     'combine_consecutive_unsets' => true,
  22.     'method_separation' => true,
  23.     'no_multiline_whitespace_before_semicolons' => true,
  24.     'single_quote' => true,
  25.     'concat_space' => ['spacing' => 'one'],
  26.     'phpdoc_align' => true,
  27.     'phpdoc_annotation_without_dot' => true,
  28.     'phpdoc_indent' => true,
  29.     'phpdoc_inline_tag' => true,
  30.  
  31.     'binary_operator_spaces' => [
  32.       'align_double_arrow' => false,
  33.       'align_equals' => false,
  34.     ],
  35.     'braces' => [
  36.       'allow_single_line_closure' => true,
  37.     ],
  38.     'declare_equal_normalize' => true,
  39.     'function_typehint_space' => true,
  40.     'hash_to_slash_comment' => true,
  41.     'include' => true,
  42.     'lowercase_cast' => true,
  43.     'no_extra_consecutive_blank_lines' => [
  44.       'curly_brace_block',
  45.       'extra',
  46.       'parenthesis_brace_block',
  47.       'square_brace_block',
  48.       'throw',
  49.       'use',
  50.     ],
  51.     'single_blank_line_before_namespace' => true,
  52.     'ternary_operator_spaces' => true,
  53.     'trim_array_spaces' => true,
  54.     'unary_operator_spaces' => true,
  55.     'whitespace_after_comma_in_array' => true,
  56.  
  57.     'no_multiline_whitespace_before_semicolons' => true,
  58.     // 'no_unreachable_default_argument_value' => true,
  59.     'no_useless_else' => true,
  60.     'no_useless_return' => true,
  61.     // 'no_php4_constructor' => true,
  62.     'no_short_echo_tag' => true,
  63.  
  64.     'ordered_class_elements' => true,
  65.     'ordered_imports' => true,
  66.  
  67.     'phpdoc_add_missing_param_annotation' => true,
  68.     'phpdoc_order' => true,
  69.     'phpdoc_types_order' => true,
  70.  
  71.     'doctrine_annotation_braces' => true,
  72.     'doctrine_annotation_indentation' => true,
  73.     'doctrine_annotation_spaces' => true,
  74.   ]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement