PHP Classes

File: .php-cs-fixer.php

Recommend this page to a friend!
  Classes of Ladislav Vondracek   Parex   .php-cs-fixer.php   Download  
File: .php-cs-fixer.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Parex
Parse command line values with a few lines of code
Author: By
Last change:
Date: 5 days ago
Size: 780 bytes
 

Contents

Class file image Download
<?php

$finder
= PhpCsFixer\Finder::create()->in([__DIR__ . '/src', __DIR__ . '/examples']);
$config = new PhpCsFixer\Config();

return
$config->setFinder($finder)->setIndent(' ')->setRules([
 
'@PSR12' => true,
 
'array_syntax' => ['syntax' => 'short'],
 
'strict_comparison' => true,
 
'no_whitespace_in_blank_line' => true,
 
'no_trailing_whitespace' => false,
 
'no_trailing_whitespace_in_comment' => false,
 
'braces' => false,
 
'single_blank_line_at_eof' => true,
 
'blank_line_after_namespace' => true,
 
'blank_line_before_statement' => [
   
'statements' => [
     
'declare',
     
'for',
     
'foreach',
     
'if',
     
'include',
     
'include_once',
     
'require',
     
'require_once',
     
'return',
     
'try',
     
'while',
     
'do',
    ],
  ],
]);