Completed
Pull Request — master (#198)
by
unknown
02:36
created
src/components/User.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      * @param array     $params
26 26
      * @param bool|true $allowCaching
27 27
      *
28
-     * @return bool
28
+     * @return boolean|null
29 29
      */
30 30
     public function can($permissionName, $params = [], $allowCaching = true)
31 31
     {
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     /**
46 46
      * Checks permissions from guest role, when no user is logged in.
47 47
      *
48
-     * @param $permissionName
48
+     * @param string $permissionName
49 49
      * @param $params
50 50
      * @param $allowCaching
51 51
      *
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      * Splits `permissionName` by underscore and match parts against more global rule
65 65
      * eg. a permission `app_site` will match, `app_site_foo`
66 66
      *
67
-     * @param $permissionName
67
+     * @param string $permissionName
68 68
      * @param $params
69 69
      * @param $allowCaching
70 70
      *
Please login to merge, or discard this patch.
src/config/main.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,8 +18,7 @@  discard block
 block discarded – undo
18 18
             // Note: For using mounted volumes or shared folders
19 19
             'dirMode' => YII_ENV_PROD ? 0777 : null,
20 20
             'bundles' => getenv('APP_ASSET_USE_BUNDLED') ?
21
-                require(__DIR__.'/assets-gen/prod.php') :
22
-                [
21
+                require(__DIR__.'/assets-gen/prod.php') : [
23 22
                     // Note: if your asset bundle includes bootstrap, you can disable the default asset
24 23
                     #'yii\bootstrap\BootstrapAsset' => false,
25 24
                 ],
@@ -78,7 +77,7 @@  discard block
 block discarded – undo
78 77
                 'docs/<file:[a-zA-Z0-9_\-\./]+>' => 'docs',
79 78
                 #'docs' => 'docs/default/index',
80 79
             ],
81
-            'languages' => explode(',',getenv('APP_LANGUAGES')),
80
+            'languages' => explode(',', getenv('APP_LANGUAGES')),
82 81
         ],
83 82
         'user' => [
84 83
             'class' => 'app\components\User',
Please login to merge, or discard this patch.
src/modules/backend/controllers/DefaultController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
                     ],
29 29
                     [
30 30
                         'allow' => true,
31
-                        'matchCallback' => function ($rule, $action) {
31
+                        'matchCallback' => function($rule, $action) {
32 32
                             return \Yii::$app->user->can(
33 33
                                 $this->module->id.'_'.$this->id.'_'.$action->id,
34 34
                                 ['route' => true]
Please login to merge, or discard this patch.
src/modules/backend/views/layouts/_sidebar.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@
 block discarded – undo
60 60
 
61 61
     // check for module configuration and assign to favourites
62 62
     $moduleConfigItem = (is_object($module)) ?
63
-        (isset($module->params['menuItems']) ? $module->params['menuItems'] : []) :
64
-        (isset($module['params']['menuItems']) ? $module['params']['menuItems'] : []);
63
+        (isset($module->params['menuItems']) ? $module->params['menuItems'] : []) : (isset($module['params']['menuItems']) ? $module['params']['menuItems'] : []);
65 64
     switch (true) {
66 65
         case !empty($moduleConfigItem):
67 66
             $moduleConfigItem = array_merge($defaultItem, $moduleConfigItem);
Please login to merge, or discard this patch.
src/widgets/Alert.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 
58 58
         foreach ($flashes as $type => $data) {
59 59
             if (isset($this->alertTypes[$type])) {
60
-                $data = (array) $data;
60
+                $data = (array)$data;
61 61
                 foreach ($data as $message) {
62 62
                     /* initialize css class for each alert box */
63 63
                     $this->options['class'] = $this->alertTypes[$type].$appendCss;
Please login to merge, or discard this patch.
src/controllers/SiteController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
                     ],
29 29
                     [
30 30
                         'allow' => true,
31
-                        'matchCallback' => function ($rule, $action) {
31
+                        'matchCallback' => function($rule, $action) {
32 32
                             return \Yii::$app->user->can(
33 33
                                 $this->module->id.'_'.$this->id.'_'.$action->id,
34 34
                                 ['route' => true]
Please login to merge, or discard this patch.
src/modules/prototype/controllers/base/LessController.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     /**
50 50
      * Lists all Less models.
51
-     * @return mixed
51
+     * @return string
52 52
      */
53 53
     public function actionIndex()
54 54
     {
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      *
75 75
      * @param integer $id
76 76
      *
77
-     * @return mixed
77
+     * @return string
78 78
      */
79 79
     public function actionView($id)
80 80
     {
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
      *
143 143
      * @param integer $id
144 144
      *
145
-     * @return mixed
145
+     * @return \yii\web\Response
146 146
      */
147 147
     public function actionDelete($id)
148 148
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
                     ],
29 29
                     [
30 30
                         'allow' => true,
31
-                        'matchCallback' => function ($rule, $action) {
31
+                        'matchCallback' => function($rule, $action) {
32 32
                             return \Yii::$app->user->can(
33 33
                                 $this->module->id.'_'.$this->id.'_'.$action->id,
34 34
                                 ['route' => true]
Please login to merge, or discard this patch.
src/modules/prototype/views/html/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
 
86 86
                     [
87 87
                         'class' => 'yii\grid\ActionColumn',
88
-                        'urlCreator' => function ($action, $model, $key, $index) {
88
+                        'urlCreator' => function($action, $model, $key, $index) {
89 89
                             // using the column name as key, not mapping to 'id' like the standard generator
90 90
                             $params = is_array($key) ? $key : [$model->primaryKey()[0] => (string)$key];
91 91
                             $params[0] = \Yii::$app->controller->id ? \Yii::$app->controller->id.'/'.$action : $action;
Please login to merge, or discard this patch.
src/modules/prototype/controllers/base/HtmlController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
                     ],
29 29
                     [
30 30
                         'allow' => true,
31
-                        'matchCallback' => function ($rule, $action) {
31
+                        'matchCallback' => function($rule, $action) {
32 32
                             return \Yii::$app->user->can(
33 33
                                 $this->module->id.'_'.$this->id.'_'.$action->id,
34 34
                                 ['route' => true]
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     /**
50 50
      * Lists all Less models.
51
-     * @return mixed
51
+     * @return string
52 52
      */
53 53
     public function actionIndex()
54 54
     {
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      *
75 75
      * @param integer $id
76 76
      *
77
-     * @return mixed
77
+     * @return string
78 78
      */
79 79
     public function actionView($id)
80 80
     {
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
      *
143 143
      * @param integer $id
144 144
      *
145
-     * @return mixed
145
+     * @return \yii\web\Response
146 146
      */
147 147
     public function actionDelete($id)
148 148
     {
Please login to merge, or discard this patch.