Skip to content
This repository was archived by the owner on Nov 15, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'magic_constant_casing' => true,
'psr4' => true,
'encoding' => true,
'full_opening_tag' => true,
'blank_line_after_namespace' => true,
'braces' => true,
'class_definition' => true,
'elseif' => true,
'function_declaration' => true,
'indentation_type' => true,
'line_ending' => true,
'lowercase_constants' => true,
'lowercase_keywords' => true,
'method_argument_space' => [ 'keep_multiple_spaces_after_comma' => false ],
'no_closing_tag' => true,
'no_spaces_after_function_name' => true,
'no_spaces_inside_parenthesis' => true,
'no_trailing_whitespace' => true,
'no_trailing_whitespace_in_comment' => true,
'single_blank_line_at_eof' => true,
'single_class_element_per_statement' => ['property'],
'single_import_per_statement' => true,
'single_line_after_imports' => true,
'switch_case_semicolon_to_colon' => true,
'switch_case_space' => true,
'visibility_required' => true,
'no_whitespace_in_blank_line' => true,
'concat_space' => [ 'spacing' => 'one' ],
'method_separation' => true,
'no_blank_lines_after_class_opening' => true,
'no_empty_comment' => true,
'no_extra_consecutive_blank_lines' => true,
'no_spaces_inside_parenthesis' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_unused_imports' => true,
'normalize_index_brace' => true,
'object_operator_without_whitespace' => true,
'ordered_imports' => true,
'phpdoc_types' => true,
'return_type_declaration'=>['space_before'=>'one'],
'trailing_comma_in_multiline_array' => true,
'single_line_after_imports' => true,
]);
15 changes: 15 additions & 0 deletions ruleset.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<ruleset name="Simonetti - Catalogo">
<rule ref="PSR2">
<exclude name="Generic.NamingConventions.CamelCapsFunctionName" />
<exclude name="PSR1.Methods.CamelCapsMethodName" />
</rule>
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.Commenting.Todo"/>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="170"/>
<property name="absoluteLineLimit" value="0"/>
</properties>
</rule>
</ruleset>