Completed
Branch feature/scrutinizer (10e3c1)
by Tobias
05:25
created
src/config/assets-prod.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Configuration file for the "yii asset" console command.
4
- * Note that in the console environment, some path aliases like '@webroot' and '@web' may not exist.
5
- * Please define these missing path aliases.
6
- */
3
+     * Configuration file for the "yii asset" console command.
4
+     * Note that in the console environment, some path aliases like '@webroot' and '@web' may not exist.
5
+     * Please define these missing path aliases.
6
+     */
7 7
 return [
8 8
     // Adjust command/callback for JavaScript files compressing:
9 9
     'jsCompressor' => 'java -jar /root/compiler.jar --js {from} --js_output_file {to}',
Please login to merge, or discard this patch.
src/modules/backend/assets/AdminAsset.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @link http://www.yiiframework.com/
4
- *
5
- * @copyright Copyright (c) 2008 Yii Software LLC
6
- * @license http://www.yiiframework.com/license/
7
- */
3
+     * @link http://www.yiiframework.com/
4
+     *
5
+     * @copyright Copyright (c) 2008 Yii Software LLC
6
+     * @license http://www.yiiframework.com/license/
7
+     */
8 8
 namespace app\modules\backend\assets;
9 9
 
10 10
 use yii\helpers\FileHelper;
Please login to merge, or discard this patch.
src/modules/prototype/controllers/api/LessController.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 {
14 14
     public $modelClass = 'app\modules\prototype\models\Less';
15 15
     /**
16
-    * @inheritdoc
17
-    */
16
+     * @inheritdoc
17
+     */
18 18
     public function behaviors()
19 19
     {
20 20
         return ArrayHelper::merge(
Please login to merge, or discard this patch.
src/modules/prototype/controllers/base/HtmlController.php 1 patch
Indentation   +102 added lines, -102 removed lines patch added patch discarded remove patch
@@ -23,71 +23,71 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public $enableCsrfValidation = false;
25 25
 
26
-		/**
27
-	* @inheritdoc
28
-	*/
29
-	public function behaviors()
30
-	{
31
-		return [
32
-			'access' => [
33
-				'class' => AccessControl::className(),
34
-				'rules' => [
35
-					[
36
-						'allow' => true,
37
-						'matchCallback' => function ($rule, $action) {return \Yii::$app->user->can($this->module->id . '_' . $this->id . '_' . $action->id, ['route' => true]);},
38
-					]
39
-				]
40
-			]
41
-		];
42
-	}
26
+        /**
27
+         * @inheritdoc
28
+         */
29
+    public function behaviors()
30
+    {
31
+        return [
32
+            'access' => [
33
+                'class' => AccessControl::className(),
34
+                'rules' => [
35
+                    [
36
+                        'allow' => true,
37
+                        'matchCallback' => function ($rule, $action) {return \Yii::$app->user->can($this->module->id . '_' . $this->id . '_' . $action->id, ['route' => true]);},
38
+                    ]
39
+                ]
40
+            ]
41
+        ];
42
+    }
43 43
 	
44
-	/**
45
-	 * Lists all Html models.
46
-	 * @return mixed
47
-	 */
48
-	public function actionIndex()
49
-	{
50
-		$searchModel  = new HtmlSearch;
51
-		$dataProvider = $searchModel->search($_GET);
44
+    /**
45
+     * Lists all Html models.
46
+     * @return mixed
47
+     */
48
+    public function actionIndex()
49
+    {
50
+        $searchModel  = new HtmlSearch;
51
+        $dataProvider = $searchModel->search($_GET);
52 52
 
53
-		Tabs::clearLocalStorage();
53
+        Tabs::clearLocalStorage();
54 54
 
55 55
         Url::remember();
56 56
         \Yii::$app->session['__crudReturnUrl'] = null;
57 57
 
58
-		return $this->render('index', [
59
-			'dataProvider' => $dataProvider,
60
-			'searchModel' => $searchModel,
61
-		]);
62
-	}
58
+        return $this->render('index', [
59
+            'dataProvider' => $dataProvider,
60
+            'searchModel' => $searchModel,
61
+        ]);
62
+    }
63 63
 
64
-	/**
65
-	 * Displays a single Html model.
66
-	 * @param integer $id
64
+    /**
65
+     * Displays a single Html model.
66
+     * @param integer $id
67 67
      *
68
-	 * @return mixed
69
-	 */
70
-	public function actionView($id)
71
-	{
68
+     * @return mixed
69
+     */
70
+    public function actionView($id)
71
+    {
72 72
         \Yii::$app->session['__crudReturnUrl'] = Url::previous();
73 73
         Url::remember();
74 74
         Tabs::rememberActiveState();
75 75
 
76 76
         return $this->render('view', [
77
-			'model' => $this->findModel($id),
78
-		]);
79
-	}
80
-
81
-	/**
82
-	 * Creates a new Html model.
83
-	 * If creation is successful, the browser will be redirected to the 'view' page.
84
-	 * @return mixed
85
-	 */
86
-	public function actionCreate()
87
-	{
88
-		$model = new Html;
89
-
90
-		try {
77
+            'model' => $this->findModel($id),
78
+        ]);
79
+    }
80
+
81
+    /**
82
+     * Creates a new Html model.
83
+     * If creation is successful, the browser will be redirected to the 'view' page.
84
+     * @return mixed
85
+     */
86
+    public function actionCreate()
87
+    {
88
+        $model = new Html;
89
+
90
+        try {
91 91
             if ($model->load($_POST) && $model->save()) {
92 92
                 return $this->redirect(Url::previous());
93 93
             } elseif (!\Yii::$app->request->isPost) {
@@ -96,37 +96,37 @@  discard block
 block discarded – undo
96 96
         } catch (\Exception $e) {
97 97
             $msg = (isset($e->errorInfo[2]))?$e->errorInfo[2]:$e->getMessage();
98 98
             $model->addError('_exception', $msg);
99
-		}
99
+        }
100 100
         return $this->render('create', ['model' => $model]);
101
-	}
102
-
103
-	/**
104
-	 * Updates an existing Html model.
105
-	 * If update is successful, the browser will be redirected to the 'view' page.
106
-	 * @param integer $id
107
-	 * @return mixed
108
-	 */
109
-	public function actionUpdate($id)
110
-	{
111
-		$model = $this->findModel($id);
112
-
113
-		if ($model->load($_POST) && $model->save()) {
101
+    }
102
+
103
+    /**
104
+     * Updates an existing Html model.
105
+     * If update is successful, the browser will be redirected to the 'view' page.
106
+     * @param integer $id
107
+     * @return mixed
108
+     */
109
+    public function actionUpdate($id)
110
+    {
111
+        $model = $this->findModel($id);
112
+
113
+        if ($model->load($_POST) && $model->save()) {
114 114
             return $this->redirect(Url::previous());
115
-		} else {
116
-			return $this->render('update', [
117
-				'model' => $model,
118
-			]);
119
-		}
120
-	}
121
-
122
-	/**
123
-	 * Deletes an existing Html model.
124
-	 * If deletion is successful, the browser will be redirected to the 'index' page.
125
-	 * @param integer $id
126
-	 * @return mixed
127
-	 */
128
-	public function actionDelete($id)
129
-	{
115
+        } else {
116
+            return $this->render('update', [
117
+                'model' => $model,
118
+            ]);
119
+        }
120
+    }
121
+
122
+    /**
123
+     * Deletes an existing Html model.
124
+     * If deletion is successful, the browser will be redirected to the 'index' page.
125
+     * @param integer $id
126
+     * @return mixed
127
+     */
128
+    public function actionDelete($id)
129
+    {
130 130
         try {
131 131
             $this->findModel($id)->delete();
132 132
         } catch (\Exception $e) {
@@ -140,29 +140,29 @@  discard block
 block discarded – undo
140 140
         if ($isPivot == true) {
141 141
             return $this->redirect(Url::previous());
142 142
         } elseif (isset(\Yii::$app->session['__crudReturnUrl']) && \Yii::$app->session['__crudReturnUrl'] != '/') {
143
-			Url::remember(null);
144
-			$url = \Yii::$app->session['__crudReturnUrl'];
145
-			\Yii::$app->session['__crudReturnUrl'] = null;
143
+            Url::remember(null);
144
+            $url = \Yii::$app->session['__crudReturnUrl'];
145
+            \Yii::$app->session['__crudReturnUrl'] = null;
146 146
 
147
-			return $this->redirect($url);
147
+            return $this->redirect($url);
148 148
         } else {
149 149
             return $this->redirect(['index']);
150 150
         }
151
-	}
152
-
153
-	/**
154
-	 * Finds the Html model based on its primary key value.
155
-	 * If the model is not found, a 404 HTTP exception will be thrown.
156
-	 * @param integer $id
157
-	 * @return Html the loaded model
158
-	 * @throws HttpException if the model cannot be found
159
-	 */
160
-	protected function findModel($id)
161
-	{
162
-		if (($model = Html::findOne($id)) !== null) {
163
-			return $model;
164
-		} else {
165
-			throw new HttpException(404, 'The requested page does not exist.');
166
-		}
167
-	}
151
+    }
152
+
153
+    /**
154
+     * Finds the Html model based on its primary key value.
155
+     * If the model is not found, a 404 HTTP exception will be thrown.
156
+     * @param integer $id
157
+     * @return Html the loaded model
158
+     * @throws HttpException if the model cannot be found
159
+     */
160
+    protected function findModel($id)
161
+    {
162
+        if (($model = Html::findOne($id)) !== null) {
163
+            return $model;
164
+        } else {
165
+            throw new HttpException(404, 'The requested page does not exist.');
166
+        }
167
+    }
168 168
 }
Please login to merge, or discard this patch.
src/modules/prototype/controllers/base/LessController.php 1 patch
Indentation   +102 added lines, -102 removed lines patch added patch discarded remove patch
@@ -23,71 +23,71 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public $enableCsrfValidation = false;
25 25
 
26
-		/**
27
-	* @inheritdoc
28
-	*/
29
-	public function behaviors()
30
-	{
31
-		return [
32
-			'access' => [
33
-				'class' => AccessControl::className(),
34
-				'rules' => [
35
-					[
36
-						'allow' => true,
37
-						'matchCallback' => function ($rule, $action) {return \Yii::$app->user->can($this->module->id . '_' . $this->id . '_' . $action->id, ['route' => true]);},
38
-					]
39
-				]
40
-			]
41
-		];
42
-	}
26
+        /**
27
+         * @inheritdoc
28
+         */
29
+    public function behaviors()
30
+    {
31
+        return [
32
+            'access' => [
33
+                'class' => AccessControl::className(),
34
+                'rules' => [
35
+                    [
36
+                        'allow' => true,
37
+                        'matchCallback' => function ($rule, $action) {return \Yii::$app->user->can($this->module->id . '_' . $this->id . '_' . $action->id, ['route' => true]);},
38
+                    ]
39
+                ]
40
+            ]
41
+        ];
42
+    }
43 43
 	
44
-	/**
45
-	 * Lists all Less models.
46
-	 * @return mixed
47
-	 */
48
-	public function actionIndex()
49
-	{
50
-		$searchModel  = new LessSearch;
51
-		$dataProvider = $searchModel->search($_GET);
44
+    /**
45
+     * Lists all Less models.
46
+     * @return mixed
47
+     */
48
+    public function actionIndex()
49
+    {
50
+        $searchModel  = new LessSearch;
51
+        $dataProvider = $searchModel->search($_GET);
52 52
 
53
-		Tabs::clearLocalStorage();
53
+        Tabs::clearLocalStorage();
54 54
 
55 55
         Url::remember();
56 56
         \Yii::$app->session['__crudReturnUrl'] = null;
57 57
 
58
-		return $this->render('index', [
59
-			'dataProvider' => $dataProvider,
60
-			'searchModel' => $searchModel,
61
-		]);
62
-	}
58
+        return $this->render('index', [
59
+            'dataProvider' => $dataProvider,
60
+            'searchModel' => $searchModel,
61
+        ]);
62
+    }
63 63
 
64
-	/**
65
-	 * Displays a single Less model.
66
-	 * @param integer $id
64
+    /**
65
+     * Displays a single Less model.
66
+     * @param integer $id
67 67
      *
68
-	 * @return mixed
69
-	 */
70
-	public function actionView($id)
71
-	{
68
+     * @return mixed
69
+     */
70
+    public function actionView($id)
71
+    {
72 72
         \Yii::$app->session['__crudReturnUrl'] = Url::previous();
73 73
         Url::remember();
74 74
         Tabs::rememberActiveState();
75 75
 
76 76
         return $this->render('view', [
77
-			'model' => $this->findModel($id),
78
-		]);
79
-	}
80
-
81
-	/**
82
-	 * Creates a new Less model.
83
-	 * If creation is successful, the browser will be redirected to the 'view' page.
84
-	 * @return mixed
85
-	 */
86
-	public function actionCreate()
87
-	{
88
-		$model = new Less;
89
-
90
-		try {
77
+            'model' => $this->findModel($id),
78
+        ]);
79
+    }
80
+
81
+    /**
82
+     * Creates a new Less model.
83
+     * If creation is successful, the browser will be redirected to the 'view' page.
84
+     * @return mixed
85
+     */
86
+    public function actionCreate()
87
+    {
88
+        $model = new Less;
89
+
90
+        try {
91 91
             if ($model->load($_POST) && $model->save()) {
92 92
                 return $this->redirect(Url::previous());
93 93
             } elseif (!\Yii::$app->request->isPost) {
@@ -96,37 +96,37 @@  discard block
 block discarded – undo
96 96
         } catch (\Exception $e) {
97 97
             $msg = (isset($e->errorInfo[2]))?$e->errorInfo[2]:$e->getMessage();
98 98
             $model->addError('_exception', $msg);
99
-		}
99
+        }
100 100
         return $this->render('create', ['model' => $model]);
101
-	}
102
-
103
-	/**
104
-	 * Updates an existing Less model.
105
-	 * If update is successful, the browser will be redirected to the 'view' page.
106
-	 * @param integer $id
107
-	 * @return mixed
108
-	 */
109
-	public function actionUpdate($id)
110
-	{
111
-		$model = $this->findModel($id);
112
-
113
-		if ($model->load($_POST) && $model->save()) {
101
+    }
102
+
103
+    /**
104
+     * Updates an existing Less model.
105
+     * If update is successful, the browser will be redirected to the 'view' page.
106
+     * @param integer $id
107
+     * @return mixed
108
+     */
109
+    public function actionUpdate($id)
110
+    {
111
+        $model = $this->findModel($id);
112
+
113
+        if ($model->load($_POST) && $model->save()) {
114 114
             return $this->redirect(Url::previous());
115
-		} else {
116
-			return $this->render('update', [
117
-				'model' => $model,
118
-			]);
119
-		}
120
-	}
121
-
122
-	/**
123
-	 * Deletes an existing Less model.
124
-	 * If deletion is successful, the browser will be redirected to the 'index' page.
125
-	 * @param integer $id
126
-	 * @return mixed
127
-	 */
128
-	public function actionDelete($id)
129
-	{
115
+        } else {
116
+            return $this->render('update', [
117
+                'model' => $model,
118
+            ]);
119
+        }
120
+    }
121
+
122
+    /**
123
+     * Deletes an existing Less model.
124
+     * If deletion is successful, the browser will be redirected to the 'index' page.
125
+     * @param integer $id
126
+     * @return mixed
127
+     */
128
+    public function actionDelete($id)
129
+    {
130 130
         try {
131 131
             $this->findModel($id)->delete();
132 132
         } catch (\Exception $e) {
@@ -140,29 +140,29 @@  discard block
 block discarded – undo
140 140
         if ($isPivot == true) {
141 141
             return $this->redirect(Url::previous());
142 142
         } elseif (isset(\Yii::$app->session['__crudReturnUrl']) && \Yii::$app->session['__crudReturnUrl'] != '/') {
143
-			Url::remember(null);
144
-			$url = \Yii::$app->session['__crudReturnUrl'];
145
-			\Yii::$app->session['__crudReturnUrl'] = null;
143
+            Url::remember(null);
144
+            $url = \Yii::$app->session['__crudReturnUrl'];
145
+            \Yii::$app->session['__crudReturnUrl'] = null;
146 146
 
147
-			return $this->redirect($url);
147
+            return $this->redirect($url);
148 148
         } else {
149 149
             return $this->redirect(['index']);
150 150
         }
151
-	}
152
-
153
-	/**
154
-	 * Finds the Less model based on its primary key value.
155
-	 * If the model is not found, a 404 HTTP exception will be thrown.
156
-	 * @param integer $id
157
-	 * @return Less the loaded model
158
-	 * @throws HttpException if the model cannot be found
159
-	 */
160
-	protected function findModel($id)
161
-	{
162
-		if (($model = Less::findOne($id)) !== null) {
163
-			return $model;
164
-		} else {
165
-			throw new HttpException(404, 'The requested page does not exist.');
166
-		}
167
-	}
151
+    }
152
+
153
+    /**
154
+     * Finds the Less model based on its primary key value.
155
+     * If the model is not found, a 404 HTTP exception will be thrown.
156
+     * @param integer $id
157
+     * @return Less the loaded model
158
+     * @throws HttpException if the model cannot be found
159
+     */
160
+    protected function findModel($id)
161
+    {
162
+        if (($model = Less::findOne($id)) !== null) {
163
+            return $model;
164
+        } else {
165
+            throw new HttpException(404, 'The requested page does not exist.');
166
+        }
167
+    }
168 168
 }
Please login to merge, or discard this patch.
src/modules/prototype/views/html/index.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 /**
8 8
 * @var yii\web\View $this
9 9
 * @var yii\data\ActiveDataProvider $dataProvider
10
-    * @var app\modules\prototype\models\search\Html $searchModel
10
+ * @var app\modules\prototype\models\search\Html $searchModel
11 11
 */
12 12
 
13 13
 $this->title = Yii::t('app', 'Htmls');
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             },
81 81
             'contentOptions' => ['nowrap'=>'nowrap']
82 82
         ],
83
-			'key',
83
+            'key',
84 84
         ],
85 85
         ]); ?>
86 86
     </div>
Please login to merge, or discard this patch.
src/modules/prototype/views/less/index.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 /**
8 8
 * @var yii\web\View $this
9 9
 * @var yii\data\ActiveDataProvider $dataProvider
10
-    * @var app\modules\prototype\models\search\Less $searchModel
10
+ * @var app\modules\prototype\models\search\Less $searchModel
11 11
 */
12 12
 
13 13
 $this->title = Yii::t('app', 'Lesses');
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             },
81 81
             'contentOptions' => ['nowrap'=>'nowrap']
82 82
         ],
83
-			'key',
83
+            'key',
84 84
         ],
85 85
         ]); ?>
86 86
     </div>
Please login to merge, or discard this patch.
src/modules/prototype/views/less/update.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     </div>
25 25
 
26 26
 	<?php echo $this->render('_form', [
27
-		'model' => $model,
28
-	]); ?>
27
+        'model' => $model,
28
+    ]); ?>
29 29
 
30 30
 </div>
Please login to merge, or discard this patch.
src/modules/prototype/views/less/view.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,15 +76,15 @@
 block discarded – undo
76 76
 
77 77
     
78 78
     <?= Tabs::widget(
79
-                 [
80
-                     'id' => 'relation-tabs',
81
-                     'encodeLabels' => false,
82
-                     'items' => [ [
79
+                    [
80
+                        'id' => 'relation-tabs',
81
+                        'encodeLabels' => false,
82
+                        'items' => [ [
83 83
     'label'   => '<b class=""># '.$model->id.'</b>',
84 84
     'content' => $this->blocks['app\modules\prototype\models\Less'],
85 85
     'active'  => true,
86 86
 ], ]
87
-                 ]
87
+                    ]
88 88
     );
89 89
     ?>
90 90
 </div>
Please login to merge, or discard this patch.