Skip to content

Commit 198caa1

Browse files
committed
phpcsfixed
1 parent 5898986 commit 198caa1

File tree

10 files changed

+68
-37
lines changed

10 files changed

+68
-37
lines changed

.php_cs

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,49 @@ X-editable extension for Yii2
66
@link https://github.com/hiqdev/yii2-x-editable
77
@package yii2-x-editable
88
@license BSD-3-Clause
9-
@copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/)
9+
@copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
1010
EOF;
1111

1212
Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($header);
1313

1414
return Symfony\CS\Config\Config::create()
15+
->setUsingCache(true)
1516
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
1617
->fixers([
17-
'-long_array_syntax', /// Arrays should use the long syntax.
18-
'-php4_constructor', /// Convert PHP4-style constructors to __construct. Warning! This could change code behavior.
19-
'-phpdoc_var_to_type', /// @var should always be written as @type.
20-
'header_comment', /// Add, replace or remove header comment.
21-
'align_double_arrow', /// Align double arrow symbols in consecutive lines.
22-
'align_equals', /// Align equals symbols in consecutive lines.
23-
'concat_with_spaces', /// Concatenation should be used with at least one whitespace around.
24-
'ereg_to_preg', /// Replace deprecated ereg regular expression functions with preg. Warning! This could change code behavior.
25-
'multiline_spaces_before_semicolon', /// Multi-line whitespace before closing semicolon are prohibited.
26-
'newline_after_open_tag', /// Ensure there is no code on the same line as the PHP open tag.
27-
'single_blank_line_before_namespace', /// There should be no blank lines before a namespace declaration.
28-
'ordered_use', /// Ordering use statements.
29-
'phpdoc_order', /// Annotations in phpdocs should be ordered so that @param come first, then @throws, then @return.
30-
'pre_increment', /// Pre incrementation/decrementation should be used if possible.
31-
'short_array_syntax', /// PHP arrays should use the PHP 5.4 short-syntax.
32-
'strict', /// Comparison should be strict. Warning! This could change code behavior.
33-
'strict_param', /// Functions should be used with $strict param. Warning! This could change code behavior.
18+
'-long_array_syntax', /// Arrays should use the long syntax
19+
'-php4_constructor', /// Convert PHP4-style constructors to __construct. Warning! This could change code behavior
20+
'-phpdoc_var_to_type', /// @var should always be written as @type
21+
'-align_double_arrow', /// Align double arrow symbols in consecutive lines
22+
'-unalign_double_arrow', /// Unalign double arrow symbols in consecutive lines
23+
'-align_equals', /// Align equals symbols in consecutive lines
24+
'-unalign_equals', /// Unalign equals symbols in consecutive lines
25+
'-blankline_after_open_tag', /// Ensure there is no code on the same line as the PHP open tag and it is followed by a blankline
26+
'-phpdoc_no_empty_return', /// @return void and @return null annotations should be omitted from phpdocs
27+
'-empty_return', /// A return statement wishing to return nothing should be simply "return"
28+
'-return', /// An empty line feed should precede a return statement
29+
'-phpdoc_params', /// All items of the @param, @throws, @return, @var, and @type phpdoc tags must be aligned vertically
30+
'-phpdoc_scalar', /// Scalar types should always be written in the same form. "int", not "integer"; "bool", not "boolean"
31+
'-phpdoc_separation', /// Annotations of a different type are separated by a single blank line
32+
'-phpdoc_to_comment', /// Docblocks should only be used on structural elements
33+
'header_comment', /// Add, replace or remove header comment
34+
'concat_with_spaces', /// Concatenation should be used with at least one whitespace around
35+
'ereg_to_preg', /// Replace deprecated ereg regular expression functions with preg. Warning! This could change code behavior
36+
'multiline_spaces_before_semicolon', /// Multi-line whitespace before closing semicolon are prohibited
37+
'newline_after_open_tag', /// Ensure there is no code on the same line as the PHP open tag
38+
'single_blank_line_before_namespace', /// There should be no blank lines before a namespace declaration
39+
'ordered_use', /// Ordering use statements
40+
'phpdoc_order', /// Annotations in phpdocs should be ordered so that @param come first, then @throws, then @return
41+
'pre_increment', /// Pre incrementation/decrementation should be used if possible
42+
'short_array_syntax', /// PHP arrays should use the PHP 5.4 short-syntax
43+
'strict', /// Comparison should be strict. Warning! This could change code behavior
44+
'strict_param', /// Functions should be used with $strict param. Warning! This could change code behavior
3445
])
3546
->finder(
3647
Symfony\CS\Finder\DefaultFinder::create()
3748
->in(__DIR__)
49+
->notPath('vendor')
3850
->notPath('runtime')
51+
->notPath('web/assets')
3952
->notPath('tests/unit/UnitTester.php')
4053
)
4154
;

src/XEditableAction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
* @link https://github.com/hiqdev/yii2-x-editable
77
* @package yii2-x-editable
88
* @license BSD-3-Clause
9-
* @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/)
9+
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
1010
*/
1111

1212
/**
13-
* @inheritdoc
13+
* {@inheritdoc}
1414
*/
1515
namespace hiqdev\xeditable;
1616

src/assets/ComboXEditableAsset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @link https://github.com/hiqdev/yii2-x-editable
77
* @package yii2-x-editable
88
* @license BSD-3-Clause
9-
* @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/)
9+
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
1010
*/
1111

1212
namespace hiqdev\xeditable\assets;
@@ -18,7 +18,7 @@ class ComboXEditableAsset extends AssetBundle
1818
public $sourcePath = '@vendor/hiqdev/yii2-x-editable/src';
1919

2020
public $js = [
21-
'assets/ComboXEditable.js'
21+
'assets/ComboXEditable.js',
2222
];
2323

2424
public $depends = [

src/assets/RemoteFormatXEditableAsset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @link https://github.com/hiqdev/yii2-x-editable
77
* @package yii2-x-editable
88
* @license BSD-3-Clause
9-
* @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/)
9+
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
1010
*/
1111

1212
namespace hiqdev\xeditable\assets;
@@ -18,7 +18,7 @@ class RemoteFormatXEditableAsset extends AssetBundle
1818
public $sourcePath = '@vendor/hiqdev/yii2-x-editable/src';
1919

2020
public $js = [
21-
'assets/RemoteFormatXEditable.js'
21+
'assets/RemoteFormatXEditable.js',
2222
];
2323

2424
public $depends = [

src/assets/XEditableAsset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @link https://github.com/hiqdev/yii2-x-editable
77
* @package yii2-x-editable
88
* @license BSD-3-Clause
9-
* @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/)
9+
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
1010
*/
1111

1212
namespace hiqdev\xeditable\assets;

src/grid/XEditableColumn.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @link https://github.com/hiqdev/yii2-x-editable
77
* @package yii2-x-editable
88
* @license BSD-3-Clause
9-
* @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/)
9+
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
1010
*/
1111

1212
namespace hiqdev\xeditable\grid;
@@ -17,8 +17,7 @@
1717
use Yii;
1818

1919
/**
20-
* Class XEditableColumn
21-
* @package hiqdev\xeditable\grid
20+
* Class XEditableColumn.
2221
*/
2322
class XEditableColumn extends DataColumn
2423
{
@@ -33,7 +32,7 @@ class XEditableColumn extends DataColumn
3332
public $widgetOptions = [];
3433

3534
/**
36-
* @inheritdoc
35+
* {@inheritdoc}
3736
*/
3837
protected function renderDataCellContent($model, $key, $index)
3938
{
@@ -44,7 +43,7 @@ protected function renderDataCellContent($model, $key, $index)
4443
'pluginOptions' => $this->pluginOptions,
4544
'linkOptions' => [
4645
'style' => ['word-break' => 'break-all'],
47-
]
46+
],
4847
], $this->widgetOptions))->run();
4948
}
5049
}

src/traits/XEditableTrait.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @link https://github.com/hiqdev/yii2-x-editable
77
* @package yii2-x-editable
88
* @license BSD-3-Clause
9-
* @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/)
9+
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
1010
*/
1111

1212
namespace hiqdev\xeditable\traits;
@@ -20,8 +20,7 @@
2020
use yii\helpers\Url;
2121

2222
/**
23-
* Class XEditableTrait
24-
* @package hiqdev\xeditable\traits
23+
* Class XEditableTrait.
2524
*/
2625
trait XEditableTrait
2726
{

src/widgets/ComboXEditable.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* X-editable extension for Yii2
5+
*
6+
* @link https://github.com/hiqdev/yii2-x-editable
7+
* @package yii2-x-editable
8+
* @license BSD-3-Clause
9+
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
10+
*/
11+
312
namespace hiqdev\xeditable\widgets;
413

514
use hipanel\helpers\ArrayHelper;
@@ -39,7 +48,8 @@ public function init()
3948
$this->registerAssets();
4049
}
4150

42-
public function registerAssets() {
51+
public function registerAssets()
52+
{
4353
parent::registerAssets();
4454
ComboXEditableAsset::register(Yii::$app->view);
4555
}

src/widgets/RemoteFormatXEditable.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* X-editable extension for Yii2
5+
*
6+
* @link https://github.com/hiqdev/yii2-x-editable
7+
* @package yii2-x-editable
8+
* @license BSD-3-Clause
9+
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
10+
*/
11+
312
namespace hiqdev\xeditable\widgets;
413

514
use hipanel\helpers\ArrayHelper;
@@ -17,8 +26,9 @@ public function init()
1726
], $this->pluginOptions);
1827
}
1928

20-
public function registerAssets() {
29+
public function registerAssets()
30+
{
2131
parent::registerAssets();
2232
RemoteFormatXEditableAsset::register(Yii::$app->view);
2333
}
24-
}
34+
}

src/widgets/XEditable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @link https://github.com/hiqdev/yii2-x-editable
77
* @package yii2-x-editable
88
* @license BSD-3-Clause
9-
* @copyright Copyright (c) 2015, HiQDev (https://hiqdev.com/)
9+
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
1010
*/
1111

1212
namespace hiqdev\xeditable\widgets;

0 commit comments

Comments
 (0)