Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.05 KB | None | 0 0
  1. <?php
  2.  
  3. declare(strict_types=1);
  4.  
  5. return PhpCsFixer\Config::create()
  6. ->setRiskyAllowed(true)
  7. ->setRules([
  8. '@PSR2' => true,
  9. 'align_multiline_comment' => true,
  10. 'array_syntax' => ['syntax' => 'short'],
  11. 'binary_operator_spaces' => ['operators' => ['=>' => null]],
  12. 'blank_line_after_opening_tag' => true,
  13. 'blank_line_before_statement' => ['statements' => ['return']],
  14. 'cast_spaces' => true,
  15. 'class_attributes_separation' => ['elements' => ['method']],
  16. 'declare_equal_normalize' => true,
  17. 'function_typehint_space' => true,
  18. 'heredoc_to_nowdoc' => true,
  19. 'include' => true,
  20. 'increment_style' => ['style' => 'post'],
  21. 'list_syntax' => ['syntax' => 'short'],
  22. 'lowercase_cast' => true,
  23. 'magic_constant_casing' => true,
  24. 'method_argument_space' => ['ensure_fully_multiline' => false],
  25. 'multiline_whitespace_before_semicolons' => true,
  26. 'native_function_casing' => true,
  27. 'no_alias_functions' => true,
  28. 'no_blank_lines_after_class_opening' => true,
  29. 'no_empty_phpdoc' => true,
  30. 'no_empty_statement' => true,
  31. 'no_extra_blank_lines' => ['tokens' => ['extra', 'use', 'use_trait']],
  32. 'no_leading_import_slash' => true,
  33. 'no_leading_namespace_whitespace' => true,
  34. 'no_mixed_echo_print' => true,
  35. 'no_multiline_whitespace_around_double_arrow' => true,
  36. 'no_short_bool_cast' => true,
  37. 'no_singleline_whitespace_before_semicolons' => true,
  38. 'no_spaces_around_offset' => ['positions' => ['inside']],
  39. 'no_trailing_comma_in_list_call' => true,
  40. 'no_trailing_comma_in_singleline_array' => true,
  41. 'no_unneeded_control_parentheses' => true,
  42. 'no_useless_return' => true,
  43. 'no_whitespace_before_comma_in_array' => true,
  44. 'no_whitespace_in_blank_line' => true,
  45. 'normalize_index_brace' => true,
  46. 'not_operator_with_successor_space' => true,
  47. 'object_operator_without_whitespace' => true,
  48. 'phpdoc_indent' => true,
  49. 'phpdoc_inline_tag' => true,
  50. 'phpdoc_no_access' => true,
  51. 'phpdoc_no_useless_inheritdoc' => true,
  52. 'phpdoc_scalar' => true,
  53. 'phpdoc_single_line_var_spacing' => true,
  54. 'phpdoc_summary' => true,
  55. 'phpdoc_to_comment' => true,
  56. 'phpdoc_trim' => true,
  57. 'phpdoc_types' => true,
  58. 'phpdoc_var_without_name' => true,
  59. 'psr4' => true,
  60. 'short_scalar_cast' => true,
  61. 'single_blank_line_before_namespace' => true,
  62. 'single_line_comment_style' => ['comment_types' => ['hash']],
  63. 'single_quote' => true,
  64. 'space_after_semicolon' => true,
  65. 'standardize_not_equals' => true,
  66. 'ternary_operator_spaces' => true,
  67. 'trailing_comma_in_multiline_array' => true,
  68. 'trim_array_spaces' => true,
  69. 'unary_operator_spaces' => true,
  70. 'whitespace_after_comma_in_array' => true,
  71. ])
  72. ->setFinder(
  73. PhpCsFixer\Finder::create()
  74. ->exclude('vendor')
  75. ->in(__DIR__)
  76. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement