Completed
Push — master ( 50c5e8...48616d )
by Jeff
02:02
created
controllers/FlowController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,12 +76,12 @@
 block discarded – undo
76 76
         }
77 77
 
78 78
         $dataProvider = new ActiveDataProvider([
79
-            'query' => Content::find()->joinWith(['type', 'flow'])->where([Flow::tableName() . '.id' => $id]),
79
+            'query' => Content::find()->joinWith(['type', 'flow'])->where([Flow::tableName().'.id' => $id]),
80 80
         ]);
81 81
 
82 82
         $dataProvider->sort->attributes['type.name'] = [
83
-            'asc' => [ContentType::tableName() . '.id' => SORT_ASC],
84
-            'desc' => [ContentType::tableName() . '.id' => SORT_DESC],
83
+            'asc' => [ContentType::tableName().'.id' => SORT_ASC],
84
+            'desc' => [ContentType::tableName().'.id' => SORT_DESC],
85 85
         ];
86 86
 
87 87
         return $this->render('view', [
Please login to merge, or discard this patch.
controllers/ScreenController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
         ]);
52 52
 
53 53
         $dataProvider->sort->attributes['template'] = [
54
-            'asc' => [ScreenTemplate::tableName() . '.name' => SORT_ASC],
55
-            'desc' => [ScreenTemplate::tableName() . '.name' => SORT_DESC],
54
+            'asc' => [ScreenTemplate::tableName().'.name' => SORT_ASC],
55
+            'desc' => [ScreenTemplate::tableName().'.name' => SORT_DESC],
56 56
         ];
57 57
 
58 58
         return $this->render('index', [
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function actionView($id)
71 71
     {
72
-        $model = Screen::find()->where([Screen::tableName() . '.id' => $id])->joinWith('template')->one();
72
+        $model = Screen::find()->where([Screen::tableName().'.id' => $id])->joinWith('template')->one();
73 73
         if ($model === null) {
74 74
             throw new NotFoundHttpException(Yii::t('app', 'The requested screen does not exist.'));
75 75
         }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             return $this->redirect(['view', 'id' => $model->id]);
104 104
         } else {
105 105
             $templates = ScreenTemplate::find()->all();
106
-            $templatesArray = array_reduce($templates, function ($a, $t) {
106
+            $templatesArray = array_reduce($templates, function($a, $t) {
107 107
                 $a[$t->id] = $t->name;
108 108
 
109 109
                 return $a;
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
             return $this->redirect(['view', 'id' => $model->id]);
133 133
         } else {
134 134
             $templates = ScreenTemplate::find()->all();
135
-            $templatesArray = array_reduce($templates, function ($a, $t) {
135
+            $templatesArray = array_reduce($templates, function($a, $t) {
136 136
                 $a[$t->id] = $t->name;
137 137
 
138 138
                 return $a;
Please login to merge, or discard this patch.
controllers/ScreenTemplateController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
             'background' => $screenTemplate->background ? $screenTemplate->background->uri : null,
73 73
             'fields' => $screenTemplate->getFields()->with('contentTypes')->asArray()->all(),
74 74
             'contentTypes' => ContentType::getAllList(),
75
-            'setFieldPosUrl' => Url::to([Yii::$app->controller->id . '/set-field-pos', 'id' => '']),
76
-            'editFieldUrl' => Url::to([Yii::$app->controller->id . '/edit-field', 'id' => '']),
75
+            'setFieldPosUrl' => Url::to([Yii::$app->controller->id.'/set-field-pos', 'id' => '']),
76
+            'editFieldUrl' => Url::to([Yii::$app->controller->id.'/edit-field', 'id' => '']),
77 77
         ]);
78 78
     }
79 79
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
             if (!is_array($newTypeIds)) {
222 222
                 $newTypeIds = [];
223 223
             }
224
-            $oldTypeIds = array_map(function ($c) {
224
+            $oldTypeIds = array_map(function($c) {
225 225
                 return $c->id;
226 226
             }, $field->contentTypes);
227 227
 
Please login to merge, or discard this patch.
controllers/ContentController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
         ]);
58 58
 
59 59
         $dataProvider->sort->attributes['type.name'] = [
60
-            'asc' => [ContentType::tableName() . '.id' => SORT_ASC],
61
-            'desc' => [ContentType::tableName() . '.id' => SORT_DESC],
60
+            'asc' => [ContentType::tableName().'.id' => SORT_ASC],
61
+            'desc' => [ContentType::tableName().'.id' => SORT_DESC],
62 62
         ];
63 63
 
64 64
         $dataProvider->sort->attributes['flow.name'] = [
65
-            'asc' => [Flow::tableName() . '.id' => SORT_ASC],
66
-            'desc' => [Flow::tableName() . '.id' => SORT_DESC],
65
+            'asc' => [Flow::tableName().'.id' => SORT_ASC],
66
+            'desc' => [Flow::tableName().'.id' => SORT_DESC],
67 67
         ];
68 68
 
69 69
         return $this->render('index', [
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                     // Latitude & longitude
135 135
                 case ContentType::KINDS['TEXT']:
136 136
                     // Same as URL, text doesn't require processing
137
-                    return $this->render('type/' . $contentType->input, [
137
+                    return $this->render('type/'.$contentType->input, [
138 138
                         'type' => $contentType,
139 139
                         'model' => $model,
140 140
                         'uploadUrl' => Url::to(['content/upload', 'type' => $type]),
Please login to merge, or discard this patch.
models/Content.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     {
144 144
         $data = $this->data;
145 145
         if ($this->type->appendParams) {
146
-            $data .= (strpos($data, '#') === false ? '#' : ';') . $this->type->appendParams;
146
+            $data .= (strpos($data, '#') === false ? '#' : ';').$this->type->appendParams;
147 147
         }
148 148
 
149 149
         $data = $this->processData($data);
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
         if ($this->type->input == ContentType::KINDS['FILE']) {
201 201
             return self::find()
202 202
                 ->joinWith(['type'])
203
-                ->where([ContentType::tableName() . '.id' => ContentType::getAllFileTypeIds()])
203
+                ->where([ContentType::tableName().'.id' => ContentType::getAllFileTypeIds()])
204 204
                 ->andWhere(['data' => $this->data])
205 205
                 ->count() == 0;
206 206
         }
@@ -237,6 +237,6 @@  discard block
 block discarded – undo
237 237
      */
238 238
     public function getRealFilepath()
239 239
     {
240
-        return \Yii::getAlias('@app/') . 'web/' . $this->getFilepath();
240
+        return \Yii::getAlias('@app/').'web/'.$this->getFilepath();
241 241
     }
242 242
 }
Please login to merge, or discard this patch.
models/ContentType.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public static function fromType($typeId)
98 98
     {
99
-        $className = self::SUB_PATH . $typeId;
99
+        $className = self::SUB_PATH.$typeId;
100 100
         if (!class_exists($className)) {
101 101
             throw new ServerErrorHttpException(Yii::t('app', 'The requested content type has no class.'));
102 102
         }
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     {
143 143
         $types = self::find()->all();
144 144
 
145
-        return array_filter($types, function ($t) use ($selfUpdate, $usableOnly) {
145
+        return array_filter($types, function($t) use ($selfUpdate, $usableOnly) {
146 146
             return ($selfUpdate === null || $t->selfUpdate == $selfUpdate) && (!$usableOnly || ($t->usable && $t->enabled));
147 147
         });
148 148
     }
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
     {
178 178
         $types = self::find()->all();
179 179
 
180
-        return array_filter(array_map(function ($t) {
180
+        return array_filter(array_map(function($t) {
181 181
             return $t->input == self::KINDS['FILE'] ? $t->id : null;
182 182
         }, $types));
183 183
     }
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      */
219 219
     public function hasCache($key)
220 220
     {
221
-        return \Yii::$app->cache->exists($this->id . $key);
221
+        return \Yii::$app->cache->exists($this->id.$key);
222 222
     }
223 223
 
224 224
     /**
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
     public function fromCache($key)
232 232
     {
233 233
         $cache = \Yii::$app->cache;
234
-        $cacheKey = $this->id . $key;
234
+        $cacheKey = $this->id.$key;
235 235
 
236 236
         return $cache->get($cacheKey);
237 237
     }
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
     public function toCache($key, $content)
246 246
     {
247 247
         $cache = \Yii::$app->cache;
248
-        $cacheKey = $this->id . $key;
248
+        $cacheKey = $this->id.$key;
249 249
         $cache->set($cacheKey, $content, static::BASE_CACHE_TIME);
250 250
     }
251 251
 
Please login to merge, or discard this patch.