Skip to content

Commit c532e15

Browse files
committed
csfixed
1 parent 22a49bc commit c532e15

File tree

224 files changed

+942
-493
lines changed

Some content is hidden

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

224 files changed

+942
-493
lines changed

.php_cs

+7-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ HiPanel core package
66
@link https://hipanel.com/
77
@package hipanel-core
88
@license BSD-3-Clause
9-
@copyright Copyright (c) 2014-2017, HiQDev (http://hiqdev.com/)
9+
@copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
1010
EOF;
1111

1212
return PhpCsFixer\Config::create()
@@ -21,8 +21,7 @@ return PhpCsFixer\Config::create()
2121
'commentType' => 'PHPDoc',
2222
],
2323
'binary_operator_spaces' => [
24-
'align_double_arrow' => null,
25-
'align_equals' => null,
24+
'default' => null,
2625
],
2726
'concat_space' => ['spacing' => 'one'],
2827
'array_syntax' => ['syntax' => 'short'],
@@ -32,6 +31,7 @@ return PhpCsFixer\Config::create()
3231
'phpdoc_scalar' => false,
3332
'phpdoc_separation' => false,
3433
'phpdoc_to_comment' => false,
34+
'phpdoc_var_without_name' => false,
3535
'method_argument_space' => false,
3636
'ereg_to_preg' => true,
3737
'blank_line_after_opening_tag' => true,
@@ -42,12 +42,16 @@ return PhpCsFixer\Config::create()
4242
'strict_comparison' => true,
4343
'strict_param' => true,
4444
'no_multiline_whitespace_before_semicolons' => true,
45+
'semicolon_after_instruction' => false,
46+
'yoda_style' => false,
4547
))
4648
->setFinder(
4749
PhpCsFixer\Finder::create()
4850
->in(__DIR__)
4951
->notPath('vendor')
5052
->notPath('runtime')
5153
->notPath('web/assets')
54+
->notPath('public/assets')
55+
->notPath('tests/_support/_generated')
5256
)
5357
;

config/acceptance.php

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
<?php
2+
/**
3+
* HiPanel core package
4+
*
5+
* @link https://hipanel.com/
6+
* @package hipanel-core
7+
* @license BSD-3-Clause
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
9+
*/
210

311
return [
412
'PARAMS_LOCATION' => dirname(__DIR__, 2) . '/composer-config-plugin-output/acceptance.php',

config/bootstrap.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
<?php
2-
2+
/**
3+
* HiPanel core package
4+
*
5+
* @link https://hipanel.com/
6+
* @package hipanel-core
7+
* @license BSD-3-Clause
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
9+
*/
310

411
if (!defined('WEBAPP_ROOT_DIR')) {
512
define('WEBAPP_ROOT_DIR', dirname(__DIR__, 4));

config/common.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
/**
3-
* HiPanel core package.
3+
* HiPanel core package
44
*
55
* @link https://hipanel.com/
66
* @package hipanel-core
77
* @license BSD-3-Clause
8-
* @copyright Copyright (c) 2014-2017, HiQDev (http://hiqdev.com/)
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
99
*/
1010

1111
return [
@@ -81,7 +81,7 @@ public function has($id)
8181
return $this->container->has($id);
8282
}
8383
};
84-
}
85-
]
86-
]
84+
},
85+
],
86+
],
8787
];

config/console.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
/**
3-
* HiPanel core package.
3+
* HiPanel core package
44
*
55
* @link https://hipanel.com/
66
* @package hipanel-core
77
* @license BSD-3-Clause
8-
* @copyright Copyright (c) 2014-2017, HiQDev (http://hiqdev.com/)
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
99
*/
1010

1111
return [

config/i18n.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
/**
3-
* HiPanel core package.
3+
* HiPanel core package
44
*
55
* @link https://hipanel.com/
66
* @package hipanel-core
77
* @license BSD-3-Clause
8-
* @copyright Copyright (c) 2014-2017, HiQDev (http://hiqdev.com/)
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
99
*/
1010

1111
return [

config/params.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
/**
3-
* HiPanel core package.
3+
* HiPanel core package
44
*
55
* @link https://hipanel.com/
66
* @package hipanel-core
77
* @license BSD-3-Clause
8-
* @copyright Copyright (c) 2014-2017, HiQDev (http://hiqdev.com/)
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
99
*/
1010

1111
return [

config/web.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
/**
3-
* HiPanel core package.
3+
* HiPanel core package
44
*
55
* @link https://hipanel.com/
66
* @package hipanel-core
77
* @license BSD-3-Clause
8-
* @copyright Copyright (c) 2014-2017, HiQDev (http://hiqdev.com/)
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
99
*/
1010

1111
return [

public/index.php

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
<?php
2+
/**
3+
* HiPanel core package
4+
*
5+
* @link https://hipanel.com/
6+
* @package hipanel-core
7+
* @license BSD-3-Clause
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
9+
*/
210

311
use hiqdev\composer\config\Builder;
412
use yii\web\Application;

src/Module.php

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
<?php
22
/**
3-
* Domain plugin for HiPanel
3+
* HiPanel core package
44
*
5-
* @link https://github.com/hiqdev/hipanel-module-domain
6-
* @package hipanel-module-domain
5+
* @link https://hipanel.com/
6+
* @package hipanel-core
77
* @license BSD-3-Clause
8-
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
99
*/
1010

1111
namespace hipanel;
1212

1313
use Yii;
14-
use yii\helpers\Url;
1514

1615
/**
1716
* HiPanel Core Module.

src/actions/Action.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
/**
3-
* HiPanel core package.
3+
* HiPanel core package
44
*
55
* @link https://hipanel.com/
66
* @package hipanel-core
77
* @license BSD-3-Clause
8-
* @copyright Copyright (c) 2014-2017, HiQDev (http://hiqdev.com/)
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
99
*/
1010

1111
namespace hipanel\actions;
@@ -47,7 +47,7 @@ class Action extends \yii\base\Action
4747
public $_scenario;
4848

4949
/**
50-
* Perform query options
50+
* Perform query options.
5151
* @var array
5252
*/
5353
public $queryOptions = [];
@@ -167,6 +167,7 @@ public function beforeSave()
167167
public function saveCollection()
168168
{
169169
$this->beforeSave();
170+
170171
return $this->collection->save();
171172
}
172173

@@ -214,6 +215,7 @@ public function perform()
214215
}
215216

216217
$this->afterPerform();
218+
217219
return $error;
218220
}
219221

src/actions/BootstrapSwitchAction.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
/**
3-
* HiPanel core package.
3+
* HiPanel core package
44
*
55
* @link https://hipanel.com/
66
* @package hipanel-core
77
* @license BSD-3-Clause
8-
* @copyright Copyright (c) 2014-2017, HiQDev (http://hiqdev.com/)
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
99
*/
1010

1111
namespace hipanel\actions;

src/actions/ClassValuesAction.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
/**
3-
* HiPanel core package.
3+
* HiPanel core package
44
*
55
* @link https://hipanel.com/
66
* @package hipanel-core
77
* @license BSD-3-Clause
8-
* @copyright Copyright (c) 2014-2017, HiQDev (http://hiqdev.com/)
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
99
*/
1010

1111
namespace hipanel\actions;

src/actions/ComboSearchAction.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
/**
3-
* HiPanel core package.
3+
* HiPanel core package
44
*
55
* @link https://hipanel.com/
66
* @package hipanel-core
77
* @license BSD-3-Clause
8-
* @copyright Copyright (c) 2014-2017, HiQDev (http://hiqdev.com/)
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
99
*/
1010

1111
namespace hipanel\actions;

src/actions/ExportAction.php

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
<?php
2+
/**
3+
* HiPanel core package
4+
*
5+
* @link https://hipanel.com/
6+
* @package hipanel-core
7+
* @license BSD-3-Clause
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
9+
*/
210

311
namespace hipanel\actions;
412

513
use hipanel\grid\RepresentationCollectionFinder;
6-
use Yii;
14+
use hiqdev\yii2\export\exporters\ExporterFactoryInterface;
715
use hiqdev\yii2\export\exporters\Type;
816
use hiqdev\yii2\export\models\CsvSettings;
917
use hiqdev\yii2\export\models\TsvSettings;
1018
use hiqdev\yii2\export\models\XlsxSettings;
11-
use hiqdev\yii2\export\exporters\ExporterFactoryInterface;
19+
use Yii;
1220

1321
class ExportAction extends IndexAction
1422
{
@@ -74,14 +82,14 @@ protected function getType()
7482
}
7583

7684
/**
77-
* @return string
7885
* @throws \Exception
86+
* @return string
7987
*/
8088
protected function guessGridClassName()
8189
{
8290
$controllerName = ucfirst($this->controller->id);
8391
$ns = implode(array_diff(explode('\\', get_class($this->controller)), [
84-
$controllerName . 'Controller', 'controllers'
92+
$controllerName . 'Controller', 'controllers',
8593
]), '\\');
8694
$girdClassName = sprintf('\%s\grid\%sGridView', $ns, $controllerName);
8795
if (class_exists($girdClassName)) {

src/actions/IndexAction.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
/**
3-
* HiPanel core package.
3+
* HiPanel core package
44
*
55
* @link https://hipanel.com/
66
* @package hipanel-core
77
* @license BSD-3-Clause
8-
* @copyright Copyright (c) 2014-2017, HiQDev (http://hiqdev.com/)
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
99
*/
1010

1111
namespace hipanel\actions;

src/actions/PerformAction.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
/**
3-
* HiPanel core package.
3+
* HiPanel core package
44
*
55
* @link https://hipanel.com/
66
* @package hipanel-core
77
* @license BSD-3-Clause
8-
* @copyright Copyright (c) 2014-2017, HiQDev (http://hiqdev.com/)
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
99
*/
1010

1111
namespace hipanel\actions;

src/actions/PrepareAjaxViewAction.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
/**
3-
* HiPanel core package.
3+
* HiPanel core package
44
*
55
* @link https://hipanel.com/
66
* @package hipanel-core
77
* @license BSD-3-Clause
8-
* @copyright Copyright (c) 2014-2017, HiQDev (http://hiqdev.com/)
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
99
*/
1010

1111
namespace hipanel\actions;

src/actions/PrepareBulkAction.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
/**
3-
* HiPanel core package.
3+
* HiPanel core package
44
*
55
* @link https://hipanel.com/
66
* @package hipanel-core
77
* @license BSD-3-Clause
8-
* @copyright Copyright (c) 2014-2017, HiQDev (http://hiqdev.com/)
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
99
*/
1010

1111
namespace hipanel\actions;

src/actions/ProxyAction.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
/**
3-
* HiPanel core package.
3+
* HiPanel core package
44
*
55
* @link https://hipanel.com/
66
* @package hipanel-core
77
* @license BSD-3-Clause
8-
* @copyright Copyright (c) 2014-2017, HiQDev (http://hiqdev.com/)
8+
* @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
99
*/
1010

1111
namespace hipanel\actions;
@@ -48,6 +48,7 @@ public function getParams()
4848
if ($this->_params instanceof \Closure) {
4949
return call_user_func($this->_params, $this, $this->getModel());
5050
}
51+
5152
return $this->_params;
5253
}
5354

@@ -86,6 +87,7 @@ public function run()
8687
Yii::$app->response->getHeaders()->add('X-PJAX-URL', $this->pjaxUrl);
8788
}
8889
$action = $this->action instanceof \Closure ? call_user_func($this->action, $this) : $this->action;
90+
8991
return $this->controller->runAction($action, $this->params);
9092
}
9193

0 commit comments

Comments
 (0)