PHP Classes

File: .php-cs-fixer.php

Recommend this page to a friend!
  Packages of Massimiliano Arione   Chess API   .php-cs-fixer.php   Download  
File: .php-cs-fixer.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Chess API
Get chess moves from the chess-api.com Web service
Author: By
Last change:
Date: 17 days ago
Size: 1,375 bytes
 

Contents

Class file image Download
<?php

return (new PhpCsFixer\Config())
    ->
setRules([
       
'@PSR12' => true,
       
'@PHP8x2Migration' => true,
       
'binary_operator_spaces' => ['operators' => ['=>' => 'single_space', '=' => 'single_space']],
       
'blank_line_before_statement' => ['statements' => ['return']],
       
'cast_spaces' => true,
       
'concat_space' => ['spacing' => 'none'],
       
'declare_strict_types' => true,
       
'fully_qualified_strict_types' => true,
       
'phpdoc_separation' => true,
       
'native_function_invocation' => ['include' => ['@all']],
       
'no_extra_blank_lines' => true,
       
'no_spaces_around_offset' => ['positions' => ['inside', 'outside']],
       
'no_unneeded_control_parentheses' => true,
       
'no_unused_imports' => true,
       
'no_whitespace_in_blank_line' => true,
       
'phpdoc_align' => true,
       
'phpdoc_no_access' => true,
       
'php_unit_fqcn_annotation' => true,
       
'self_accessor' => true,
       
'single_quote' => true,
       
'return_type_declaration' => true,
       
'trailing_comma_in_multiline' => ['elements' => ['arguments', 'arrays', 'match', 'parameters']],
       
'trim_array_spaces' => true,
       
'void_return' => true,
    ])
    ->
setFinder(
       
PhpCsFixer\Finder::create()
            ->
in(__DIR__ . '/src')
            ->
in(__DIR__ . '/tests')
    )
    ->
setRiskyAllowed(true)
;