Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ te_ST/
lib/tinymce/jscripts/tiny_mce/*.gz
lib/vendor
lib/components
.DS_Store
.DS_Store
.php_cs.cache
28 changes: 28 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude([
'.github',
'cypress',
'dtd',
'js',
'lib',
'locale',
'registry',
'schemas',
'styles',
'templates',
'xml',
])
->name('*.php')
->name('_ide_helper')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true);

$rules = include '.php_cs_rules';

$config = new PhpCsFixer\Config();
return $config->setRules($rules)
->setFinder($finder);
26 changes: 26 additions & 0 deletions .php_cs_rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

return [
'@PSR12' => true,
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => true,
'concat_space' => ['spacing' => 'one'],
'explicit_string_variable' => true,
'list_syntax' => ['syntax' => 'short'],
'method_chaining_indentation' => true,
'no_unused_imports' => true,
'no_spaces_around_offset' => true,
'no_superfluous_phpdoc_tags' => true,
'no_whitespace_before_comma_in_array' => true,
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_no_empty_return' => true,
'phpdoc_order' => true,
'phpdoc_separation' => true,
'phpdoc_var_annotation_correct_order' => true,
'single_quote' => true,
'standardize_increment' => true,
'standardize_not_equals' => true,
'ternary_to_null_coalescing' => true,
];
Loading