Advertisement
Guest User

php cs fixer

a guest
Jun 1st, 2022
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.87 KB | None | 0 0
  1. <?php
  2. /*
  3.  * This document has been generated with
  4.  * https://mlocati.github.io/php-cs-fixer-configurator/#version:3.8.0|configurator
  5.  * you can change this configuration by importing this file.
  6.  */
  7. $config = new PhpCsFixer\Config();
  8. return $config
  9.     ->setRules([
  10.         'align_multiline_comment'                 => ['comment_type' => 'all_multiline'],
  11.         'array_indentation'                       => true,
  12.         'array_syntax'                            => ['syntax' => 'short'],
  13.         'binary_operator_spaces'                  => ['default' => 'align_single_space_minimal'],
  14.         'blank_line_after_namespace'              => true,
  15.         'braces'                                  => ['allow_single_line_anonymous_class_with_empty_body' => true,'allow_single_line_closure' => true,'position_after_anonymous_constructs' => 'same','position_after_control_structures' => 'same','position_after_functions_and_oop_constructs' => 'same'],
  16.         'cast_spaces'                             => ['space' => 'none'],
  17.         'class_definition'                        => true,
  18.         'clean_namespace'                         => true,
  19.         'compact_nullable_typehint'               => true,
  20.         'concat_space'                            => ['spacing' => 'none'],
  21.         'control_structure_continuation_position' => ['position' => 'same_line'],
  22.         'function_declaration'                    => ['closure_function_spacing' => 'none','trailing_comma_single_line' => true],
  23.         'function_typehint_space'                 => true,
  24.         'heredoc_indentation'                     => true,
  25.         'indentation_type'                        => true,
  26.         'list_syntax'                             => true,
  27.         'method_argument_space'                   => [
  28.             'after_heredoc'                    => false,
  29.             'keep_multiple_spaces_after_comma' => false,
  30.             'on_multiline'                     => 'ensure_fully_multiline'
  31.         ],
  32.         'method_chaining_indentation'             => true,
  33.         'native_function_type_declaration_casing' => true,
  34.         'no_spaces_after_function_name'           => true,
  35.         'no_spaces_around_offset'                 => true,
  36.         'no_unneeded_curly_braces'                => true,
  37.         'ordered_imports'                         => ['sort_algorithm' => 'alpha'],
  38.         'phpdoc_align'                            => ['align' => 'vertical'],
  39.         'phpdoc_indent'                           => true,
  40.         'phpdoc_order'                            => true,
  41.         'phpdoc_scalar'                           => true,
  42.         'yoda_style'                              => ['always_move_variable' => true,'equal' => true,'identical' => true,'less_and_greater' => false],
  43.     ])
  44.     ->setFinder(
  45.         PhpCsFixer\Finder::create()
  46.             ->exclude('vendor')
  47.             ->in(__DIR__)
  48.     )
  49. ;
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement