PHP Classes

File: .php_cs.dist

Recommend this page to a friend!
  Classes of Niko   PHP HouseHold   .php_cs.dist   Download  
File: .php_cs.dist
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP HouseHold
Manage the stock of groceries in a house
Author: By
Last change:
Date: 2 years ago
Size: 2,327 bytes
 

Contents

Class file image Download
<?php

$year
= date('Y');
$header = "
Household
$year ? NOTICE OF LICENSE
This source file is released under commercial license by copyright holders.

@copyright 2017-
$year (c) Niko Granö (https://granö.fi)
@copyright 2014-
$year (c) IronLions (https://ironlions.fi)
"
;

$config = PhpCsFixer\Config::create()
    ->
setRiskyAllowed(true)
    ->
setRules([
       
'@PSR2' => true,
       
'@Symfony' => true,
       
'@Symfony:risky' => true,
       
'align_multiline_comment' => true,
       
'array_syntax' => ['syntax' => 'short'],
       
'binary_operator_spaces' => ['align_double_arrow' => true],
       
'blank_line_before_statement' => true,
       
'combine_consecutive_unsets' => true,
       
'concat_space' => ['spacing' => 'none'],
       
'declare_strict_types' => true,
       
'general_phpdoc_annotation_remove' => ['annotations' => ['expectedException', 'expectedExceptionMessage', 'expectedExceptionMessageRegExp']],
       
'heredoc_to_nowdoc' => true,
       
'list_syntax' => ['syntax' => 'short'],
       
'method_argument_space' => ['ensure_fully_multiline' => true],
       
'no_extra_consecutive_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']],
       
'no_null_property_initialization' => true,
       
'no_short_echo_tag' => true,
       
'no_superfluous_elseif' => true,
       
#'no_superfluous_phpdoc_tags' => true,
       
'no_unneeded_curly_braces' => true,
       
'no_unneeded_final_method' => true,
       
'no_unreachable_default_argument_value' => true,
       
'no_useless_else' => true,
       
'no_useless_return' => true,
       
'protected_to_private' => false,
       
'phpdoc_align' => true,
       
'ordered_class_elements' => false,
       
'ordered_imports' => true,
       
'php_unit_strict' => true,
       
'phpdoc_add_missing_param_annotation' => true,
       
'phpdoc_order' => true,
       
'semicolon_after_instruction' => true,
       
'single_line_comment_style' => true,
       
'strict_comparison' => true,
       
'strict_param' => true,
       
'header_comment' => array('header' => $header, 'commentType' => 'PHPDoc'),
    ])
    ->
setIndent(' ')
    ->
setFinder(
       
PhpCsFixer\Finder::create()
            ->
in('src')
    )
;

return
$config;