Skip to content

Commit c9ba0cb

Browse files
committed
CS fix
1 parent a5f473e commit c9ba0cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+387
-239
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
indent_style = space
9+
indent_size = 4
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
max_line_length = 80
13+
14+
[*.md]
15+
trim_trailing_whitespace = false

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ vendor
1313

1414
# composer lock files
1515
composer.lock
16+
17+
# PHP CS Fixer
18+
.php_cs.cache

.php_cs

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
<?php
2+
$header = <<<'EOF'
3+
@link http://www.yiiframework.com/
4+
@copyright Copyright (c) 2008 Yii Software LLC
5+
@license http://www.yiiframework.com/license/
6+
EOF;
7+
8+
$finder = PhpCsFixer\Finder::create()
9+
->in(__DIR__ . '/src')
10+
;
11+
12+
return PhpCsFixer\Config::create()
13+
->setRiskyAllowed(true)
14+
->setRules([
15+
'@PSR2' => true,
16+
'array_syntax' => [
17+
'syntax' => 'short',
18+
],
19+
'binary_operator_spaces' => [
20+
'align_double_arrow' => false,
21+
'align_equals' => false,
22+
],
23+
'blank_line_after_opening_tag' => true,
24+
'cast_spaces' => true,
25+
'concat_space' => [
26+
'spacing' => 'one',
27+
],
28+
'dir_constant' => true,
29+
'ereg_to_preg' => true,
30+
'function_typehint_space' => true,
31+
'hash_to_slash_comment' => true,
32+
'include' => true,
33+
'heredoc_to_nowdoc' => true,
34+
'is_null' => [
35+
'use_yoda_style' => false,
36+
],
37+
'linebreak_after_opening_tag' => true,
38+
'lowercase_cast' => true,
39+
'magic_constant_casing' => true,
40+
'modernize_types_casting' => true,
41+
'native_function_casing' => true,
42+
'new_with_braces' => true,
43+
'no_alias_functions' => true,
44+
'no_blank_lines_after_class_opening' => true,
45+
'no_blank_lines_after_phpdoc' => true,
46+
'no_empty_comment' => true,
47+
'no_empty_phpdoc' => true,
48+
'no_empty_statement' => true,
49+
'no_extra_consecutive_blank_lines' => [
50+
'tokens' => [
51+
'break',
52+
'continue',
53+
'return',
54+
'throw',
55+
'use',
56+
'use_trait',
57+
'parenthesis_brace_block',
58+
'square_brace_block',
59+
],
60+
],
61+
'no_leading_import_slash' => true,
62+
'no_leading_namespace_whitespace' => true,
63+
'no_mixed_echo_print' => true,
64+
'no_multiline_whitespace_around_double_arrow' => true,
65+
'no_multiline_whitespace_before_semicolons' => true,
66+
'no_php4_constructor' => true,
67+
'no_short_bool_cast' => true,
68+
'no_singleline_whitespace_before_semicolons' => true,
69+
'no_spaces_around_offset' => true,
70+
'no_trailing_comma_in_list_call' => true,
71+
'no_trailing_comma_in_singleline_array' => true,
72+
'no_unneeded_control_parentheses' => true,
73+
'no_unused_imports' => true,
74+
'no_useless_else' => true,
75+
'no_useless_return' => true,
76+
'no_whitespace_before_comma_in_array' => true,
77+
'no_whitespace_in_blank_line' => true,
78+
'non_printable_character' => true,
79+
'normalize_index_brace' => true,
80+
'object_operator_without_whitespace' => true,
81+
'ordered_imports' => [
82+
'sortAlgorithm' => 'alpha',
83+
'importsOrder' => [
84+
'const',
85+
'function',
86+
'class',
87+
],
88+
],
89+
'php_unit_construct' => true,
90+
'php_unit_dedicate_assert' => true,
91+
'php_unit_fqcn_annotation' => true,
92+
'phpdoc_add_missing_param_annotation' => true,
93+
'phpdoc_indent' => true,
94+
'phpdoc_no_access' => true,
95+
'phpdoc_no_empty_return' => true,
96+
'phpdoc_no_package' => true,
97+
'phpdoc_no_useless_inheritdoc' => true,
98+
'phpdoc_return_self_reference' => true,
99+
'phpdoc_scalar' => true,
100+
'phpdoc_single_line_var_spacing' => true,
101+
'phpdoc_summary' => true,
102+
'phpdoc_trim' => true,
103+
'phpdoc_types' => true,
104+
'phpdoc_var_without_name' => false,
105+
'protected_to_private' => true,
106+
'psr4' => true,
107+
'self_accessor' => true,
108+
'short_scalar_cast' => true,
109+
'single_blank_line_before_namespace' => true,
110+
'single_quote' => true,
111+
'standardize_not_equals' => true,
112+
'ternary_operator_spaces' => true,
113+
'trailing_comma_in_multiline_array' => true,
114+
'trim_array_spaces' => true,
115+
'unary_operator_spaces' => true,
116+
'whitespace_after_comma_in_array' => true,
117+
'header_comment' => [
118+
'header' => $header,
119+
'commentType' => 'PHPDoc',
120+
'separate' => 'bottom',
121+
],
122+
])
123+
->setFinder($finder)
124+
;

src/ErrorEvent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace yii\queue;
99

1010
/**
11-
* Class ErrorEvent
11+
* Error Event.
1212
*
1313
* @author Roman Zhuravlev <zhuravljov@gmail.com>
1414
*/
@@ -22,4 +22,4 @@ class ErrorEvent extends ExecEvent
2222
* @var bool
2323
*/
2424
public $retry;
25-
}
25+
}

src/ExecEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace yii\queue;
99

1010
/**
11-
* Class ExecEvent
11+
* Exec Event.
1212
*
1313
* @author Roman Zhuravlev <zhuravljov@gmail.com>
1414
*/

src/Job.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
namespace yii\queue;
99

1010
/**
11-
* Interface Job
11+
* Job Interface.
1212
*
1313
* @deprecated Will be removed in 2.1.0. Use JobInterface instead of Job.
1414
*
1515
* @author Roman Zhuravlev <zhuravljov@gmail.com>
1616
*/
1717
interface Job extends JobInterface
1818
{
19-
}
19+
}

src/JobEvent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use yii\base\Event;
1111

1212
/**
13-
* Class JobEvent
13+
* Job Event.
1414
*
1515
* @author Roman Zhuravlev <zhuravljov@gmail.com>
1616
*/
@@ -33,4 +33,4 @@ class JobEvent extends Event
3333
* @var int time to reserve in seconds of the job
3434
*/
3535
public $ttr;
36-
}
36+
}

src/JobInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace yii\queue;
99

1010
/**
11-
* Interface JobInterface
11+
* Job Interface.
1212
*
1313
* @author Roman Zhuravlev <zhuravljov@gmail.com>
1414
*/
@@ -18,4 +18,4 @@ interface JobInterface
1818
* @param Queue $queue which pushed and is handling the job
1919
*/
2020
public function execute($queue);
21-
}
21+
}

src/LogBehavior.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use yii\base\Behavior;
1212

1313
/**
14-
* Class LogBehavior
14+
* Log Behavior.
1515
*
1616
* @author Roman Zhuravlev <zhuravljov@gmail.com>
1717
*/

src/PushEvent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace yii\queue;
99

1010
/**
11-
* Class PushEvent
11+
* Push Event.
1212
*
1313
* @author Roman Zhuravlev <zhuravljov@gmail.com>
1414
*/
@@ -22,4 +22,4 @@ class PushEvent extends JobEvent
2222
* @var mixed
2323
*/
2424
public $priority;
25-
}
25+
}

0 commit comments

Comments
 (0)