PHP Classes

File: .php_cs

Recommend this page to a friend!
  Classes of Mahmoud Elnezamy   PHP Route Library   .php_cs   Download  
File: .php_cs
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Route Library
Route requests to registered callback functions
Author: By
Last change:
Date: 3 years ago
Size: 2,612 bytes
 

Contents

Class file image Download
<?php

$header
= <<<'EOF'
This file is part of Just.

@license https://github.com/just-framework/php/blob/master/LICENSE MIT License
@link https://justframework.com/php/
@author Mahmoud Elnezamy <mahmoud@nezamy.com>
@package Just
EOF;

return
PhpCsFixer\Config::create()
    ->
setRiskyAllowed(true)
    ->
setRules([
       
'@PSR2' => true,
       
'@Symfony' => true,
       
'@DoctrineAnnotation' => true,
       
'@PhpCsFixer' => true,
       
'header_comment' => [
           
'commentType' => 'PHPDoc',
           
'header' => $header,
           
'separate' => 'none',
           
'location' => 'after_declare_strict',
        ],
       
'array_syntax' => [
           
'syntax' => 'short'
       
],
       
'list_syntax' => [
           
'syntax' => 'short'
       
],
       
'concat_space' => [
           
'spacing' => 'one'
       
],
       
'blank_line_before_statement' => [
           
'statements' => [
               
'declare',
            ],
        ],
       
'ordered_imports' => [
           
'imports_order' => [
               
'class', 'function', 'const',
            ],
           
'sort_algorithm' => 'alpha',
        ],
       
'single_line_comment_style' => [
           
'comment_types' => [
            ],
        ],
       
'yoda_style' => [
           
'always_move_variable' => false,
           
'equal' => false,
           
'identical' => false,
        ],
       
'phpdoc_align' => [
           
'align' => 'left',
        ],
       
'multiline_whitespace_before_semicolons' => [
           
'strategy' => 'no_multi_line',
        ],
       
'constant_case' => [
           
'case' => 'lower',
        ],
       
'class_attributes_separation' => true,
       
'combine_consecutive_unsets' => true,
       
'declare_strict_types' => true,
       
'linebreak_after_opening_tag' => true,
       
'lowercase_static_reference' => true,
       
'no_useless_else' => true,
       
'no_unused_imports' => true,
       
'not_operator_with_successor_space' => true,
       
'not_operator_with_space' => false,
       
'ordered_class_elements' => true,
       
'php_unit_strict' => false,
       
'phpdoc_separation' => false,
       
'single_quote' => true,
       
'standardize_not_equals' => true,
       
'multiline_comment_opening_closing' => true,
       
'phpdoc_add_missing_param_annotation' => true,
       
'no_null_property_initialization' => true
   
])
    ->
setFinder(
       
PhpCsFixer\Finder::create()
            ->
exclude('public')
            ->
exclude('runtime')
            ->
exclude('vendor')
            ->
in(__DIR__)
    )
    ->
setUsingCache(false);