PHP Classes

File: .php_cs.dist

Recommend this page to a friend!
  Classes of Niko   PHP JSON to Object Mapper   .php_cs.dist   Download  
File: .php_cs.dist
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP JSON to Object Mapper
Map JSON decoded data into entity objects
Author: By
Last change:
Date: 5 years ago
Size: 1,533 bytes
 

Contents

Class file image Download
<?php
$header
= '
NOTICE OF LICENSE

This source file is released under MIT license by Niko Granö.

@copyright Niko Granö <niko9911@ironlions.fi> (https://granö.fi)
'
;


/** @noinspection PhpUndefinedNamespaceInspection */
$finder = PhpCsFixer\Finder::create()
    ->
in(['./src', './tests']);

return
PhpCsFixer\Config::create()
    ->
setRiskyAllowed(true)
    ->
setRules([
       
'@PSR2' => true,
       
'@Symfony' => true,
       
'@Symfony:risky' => true,
       
'@PHP71Migration:risky' => true,
       
'align_multiline_comment' => true,
       
'array_syntax' => ['syntax' => 'short'],
       
'cast_spaces' => false,
       
'binary_operator_spaces' => ['align_double_arrow' => true],
       
'concat_space' => ['spacing' => 'none'],
       
'combine_consecutive_issets' => true,
       
'combine_consecutive_unsets' => true,
       
'mb_str_functions' => true,
       
'native_function_invocation' => true,
       
'no_php4_constructor' => true,
       
'no_short_echo_tag' => true,
       
'no_superfluous_elseif' => true,
       
'no_useless_else' => true,
       
'no_useless_return' => true,
       
'protected_to_private' => false,
       
'phpdoc_align' => true,
       
'strict_comparison' => true,
       
'strict_param' => true,
       
'header_comment' => array('header' => $header, 'commentType' => 'PHPDoc'),
       
'method_argument_space' => ['ensure_fully_multiline' => true, 'keep_multiple_spaces_after_comma' => false],
    ])
    ->
setIndent(' ')
    ->
setLineEnding("\n")
    ->
setFinder($finder);