Advertisement
Guest User

myconfig.php_cs

a guest
Nov 16th, 2018
635
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. <?php
  2.  
  3. $finder = PhpCsFixer\Finder::create()
  4. ->exclude('somedir')
  5. ->notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php')
  6. ->in(__DIR__)
  7. ;
  8.  
  9. return PhpCsFixer\Config::create()
  10. ->setRules(array(
  11. '@PSR2' => true,
  12. 'array_indentation' => true,
  13. 'array_syntax' => array('syntax' => 'short'),
  14. 'combine_consecutive_unsets' => true,
  15. 'method_separation' => true,
  16. 'no_multiline_whitespace_before_semicolons' => true,
  17. 'single_quote' => true,
  18.  
  19. 'binary_operator_spaces' => array(
  20. 'align_double_arrow' => false,
  21. 'align_equals' => false,
  22. ),
  23. // 'blank_line_after_opening_tag' => true,
  24. // 'blank_line_before_return' => true,
  25. 'braces' => array(
  26. 'allow_single_line_closure' => true,
  27. ),
  28. 'cast_spaces' => true,
  29. // 'class_definition' => array('singleLine' => true),
  30. 'concat_space' => array('spacing' => 'one'),
  31. 'declare_equal_normalize' => true,
  32. 'function_typehint_space' => true,
  33. 'hash_to_slash_comment' => true,
  34. 'include' => true,
  35. 'lowercase_cast' => true,
  36. // 'native_function_casing' => true,
  37. // 'new_with_braces' => true,
  38. // 'no_blank_lines_after_class_opening' => true,
  39. // 'no_blank_lines_after_phpdoc' => true,
  40. // 'no_empty_comment' => true,
  41. // 'no_empty_phpdoc' => true,
  42. // 'no_empty_statement' => true,
  43. 'no_extra_consecutive_blank_lines' => array(
  44. 'curly_brace_block',
  45. 'extra',
  46. 'parenthesis_brace_block',
  47. 'square_brace_block',
  48. 'throw',
  49. 'use',
  50. ),
  51. // 'no_leading_import_slash' => true,
  52. // 'no_leading_namespace_whitespace' => true,
  53. // 'no_mixed_echo_print' => array('use' => 'echo'),
  54. 'no_multiline_whitespace_around_double_arrow' => true,
  55. // 'no_short_bool_cast' => true,
  56. // 'no_singleline_whitespace_before_semicolons' => true,
  57. 'no_spaces_around_offset' => true,
  58. // 'no_trailing_comma_in_list_call' => true,
  59. // 'no_trailing_comma_in_singleline_array' => true,
  60. // 'no_unneeded_control_parentheses' => true,
  61. // 'no_unused_imports' => true,
  62. 'no_whitespace_before_comma_in_array' => true,
  63. 'no_whitespace_in_blank_line' => true,
  64. // 'normalize_index_brace' => true,
  65. 'object_operator_without_whitespace' => true,
  66. // 'php_unit_fqcn_annotation' => true,
  67. // 'phpdoc_align' => true,
  68. // 'phpdoc_annotation_without_dot' => true,
  69. // 'phpdoc_indent' => true,
  70. // 'phpdoc_inline_tag' => true,
  71. // 'phpdoc_no_access' => true,
  72. // 'phpdoc_no_alias_tag' => true,
  73. // 'phpdoc_no_empty_return' => true,
  74. // 'phpdoc_no_package' => true,
  75. // 'phpdoc_no_useless_inheritdoc' => true,
  76. // 'phpdoc_return_self_reference' => true,
  77. // 'phpdoc_scalar' => true,
  78. // 'phpdoc_separation' => true,
  79. // 'phpdoc_single_line_var_spacing' => true,
  80. // 'phpdoc_summary' => true,
  81. // 'phpdoc_to_comment' => true,
  82. // 'phpdoc_trim' => true,
  83. // 'phpdoc_types' => true,
  84. // 'phpdoc_var_without_name' => true,
  85. // 'pre_increment' => true,
  86. // 'return_type_declaration' => true,
  87. // 'self_accessor' => true,
  88. // 'short_scalar_cast' => true,
  89. 'single_blank_line_before_namespace' => true,
  90. // 'single_class_element_per_statement' => true,
  91. // 'space_after_semicolon' => true,
  92. // 'standardize_not_equals' => true,
  93. 'ternary_operator_spaces' => true,
  94. // 'trailing_comma_in_multiline_array' => true,
  95. 'trim_array_spaces' => true,
  96. 'unary_operator_spaces' => true,
  97. 'whitespace_after_comma_in_array' => true,
  98. ))
  99. ->setIndent("\t")
  100. ->setLineEnding("\n")
  101. ->setFinder($finder)
  102. ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement