This repository has been archived by the owner on Feb 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
/
.php_cs.dist
38 lines (37 loc) · 1.53 KB
/
.php_cs.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
return PhpCsFixer\Config::create()
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__)
)
->setIndent(' ')
->setLineEnding("\n")
->setRules([
'@Symfony' => true,
// Override @Symfony rules
'pre_increment' => false,
'blank_line_before_statement' => ['statements' => ['return', 'try', 'throw']],
'phpdoc_align' => ['tags' => ['param', 'throws']],
'method_argument_space' => ['ensure_fully_multiline' => false],
'binary_operator_spaces' => [
'align_double_arrow' => true,
'align_equals' => false,
],
'phpdoc_annotation_without_dot' => false,
'yoda_style' => [
// Symfony writes their conditions backwards; we use normal order.
'equal' => false,
'identical' => false,
'less_and_greater' => false,
],
'is_null' => [
// Replaces all is_null() with === null.
'use_yoda_style' => false,
],
// Custom rules
'align_multiline_comment' => true,
'phpdoc_add_missing_param_annotation' => ['only_untyped' => false],
'ordered_imports' => true,
'phpdoc_order' => true,
'array_syntax' => ['syntax' => 'short'],
]);