Skip to content

Commit 93deb64

Browse files
committed
Revert "remove friendsofphp/php-cs-fixer"
This reverts commit f6cce56
1 parent 2683b3f commit 93deb64

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

.php_cs.dist

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->in(['config', 'src', 'tests']);
5+
6+
return PhpCsFixer\Config::create()
7+
->setUsingCache(false)
8+
->setFinder($finder)
9+
->setRules([
10+
'psr0' => false,
11+
'@PSR2' => true,
12+
'blank_line_after_namespace' => true,
13+
'braces' => true,
14+
'class_definition' => true,
15+
'concat_space' => ['spacing' => 'none'],
16+
'elseif' => true,
17+
'function_declaration' => true,
18+
'indentation_type' => true,
19+
'line_ending' => true,
20+
'lowercase_constants' => true,
21+
'lowercase_keywords' => true,
22+
'method_argument_space' => [
23+
'ensure_fully_multiline' => true,
24+
],
25+
'no_break_comment' => true,
26+
'no_closing_tag' => true,
27+
'no_spaces_after_function_name' => true,
28+
'no_spaces_inside_parenthesis' => true,
29+
'no_trailing_whitespace' => true,
30+
'no_trailing_whitespace_in_comment' => true,
31+
'single_blank_line_at_eof' => true,
32+
'single_class_element_per_statement' => [
33+
'elements' => ['property'],
34+
],
35+
'single_import_per_statement' => true,
36+
'single_line_after_imports' => true,
37+
'switch_case_semicolon_to_colon' => true,
38+
'switch_case_space' => true,
39+
'visibility_required' => true,
40+
'encoding' => true,
41+
'full_opening_tag' => true,
42+
'blank_line_before_return' => true,
43+
'no_trailing_comma_in_singleline_array' => true,
44+
'trailing_comma_in_multiline_array' => true,
45+
'array_indentation' => true,
46+
'binary_operator_spaces' => [
47+
'operators' => [
48+
'=' => 'single_space',
49+
],
50+
],
51+
'fully_qualified_strict_types' => true,
52+
'void_return' => true,
53+
'cast_spaces' => [
54+
'space' => 'single',
55+
],
56+
'not_operator_with_successor_space' => true,
57+
]);

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"phpunit/phpunit": "^9.3",
1919
"mockery/mockery": "^1.0",
2020
"laravel/horizon": "^5.0",
21+
"friendsofphp/php-cs-fixer": "^2.16",
2122
"orchestra/testbench": "^6.0"
2223
},
2324
"autoload": {

0 commit comments

Comments
 (0)