Test Setup Failed
Push — master ( 380045...c38148 )
by Александр
38:31
created
src/base/Component.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     {
185 185
         $this->_callAttributes = $this->attributes;
186 186
 
187
-        \Yii::beginProfile("Init: ".static::class);
187
+        \Yii::beginProfile("Init: " . static::class);
188 188
 
189 189
         if (!\Yii::$app instanceof Application) {
190 190
             if ($this->cmsSite === null && isset(\Yii::$app->currentSite) && \Yii::$app->currentSite->site) {
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 
199 199
         $this->_initSettings();
200 200
 
201
-        \Yii::endProfile("Init: ".static::class);
201
+        \Yii::endProfile("Init: " . static::class);
202 202
 
203 203
         $this->trigger(self::EVENT_INIT);
204 204
     }
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         } catch (Exception $e) {
217 217
         } catch (\Exception $e) {
218 218
             \Yii::error(\Yii::t('skeeks/cms', '{cms} component error load defaul settings',
219
-                    ['cms' => 'Cms']).': '.$e->getMessage());
219
+                    ['cms' => 'Cms']) . ': ' . $e->getMessage());
220 220
         }
221 221
 
222 222
         return $this;
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
      */
676 676
     public function getCallableId()
677 677
     {
678
-        return $this->settingsId.'-callable';
678
+        return $this->settingsId . '-callable';
679 679
     }
680 680
 
681 681
     /**
@@ -686,7 +686,7 @@  discard block
 block discarded – undo
686 686
     public function getSettingsId($autoGenerate = true)
687 687
     {
688 688
         if ($autoGenerate && $this->_settingsId === null) {
689
-            $this->_settingsId = static::$autoSettingsIdPrefix.static::$counterSettings++;
689
+            $this->_settingsId = static::$autoSettingsIdPrefix . static::$counterSettings++;
690 690
         }
691 691
 
692 692
         return $this->_settingsId;
@@ -770,7 +770,7 @@  discard block
 block discarded – undo
770 770
         if (isset($this->{$name})) {
771 771
             $this->{$name} = $value;
772 772
         } else {
773
-            throw new InvalidParamException(get_class($this).' has no attribute named "'.$name.'".');
773
+            throw new InvalidParamException(get_class($this) . ' has no attribute named "' . $name . '".');
774 774
         }
775 775
     }
776 776
 
@@ -820,7 +820,7 @@  discard block
 block discarded – undo
820 820
         if (isset($this->_oldAttributes[$name]) || $this->hasAttribute($name)) {
821 821
             $this->_oldAttributes[$name] = $value;
822 822
         } else {
823
-            throw new InvalidParamException(get_class($this).' has no attribute named "'.$name.'".');
823
+            throw new InvalidParamException(get_class($this) . ' has no attribute named "' . $name . '".');
824 824
         }
825 825
     }
826 826
 
Please login to merge, or discard this patch.
src/cmsWidgets/treeMenu/TreeMenuCmsWidget.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -315,12 +315,12 @@
 block discarded – undo
315 315
 
316 316
     protected function _run()
317 317
     {
318
-        $key = $this->getCacheKey().'run';
318
+        $key = $this->getCacheKey() . 'run';
319 319
 
320 320
         $dependency = new TagDependency([
321 321
             'tags' =>
322 322
                 [
323
-                    $this->className().(string)$this->namespace,
323
+                    $this->className() . (string)$this->namespace,
324 324
                     (new Tree())->getTableCacheTag(),
325 325
                 ],
326 326
         ]);
Please login to merge, or discard this patch.
src/cmsWidgets/contentElements/ContentElementsCmsWidget.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -121,15 +121,15 @@  discard block
 block discarded – undo
121 121
         $this->initDataProvider();
122 122
 
123 123
         if ($this->createdBy) {
124
-            $this->dataProvider->query->andWhere([$className::tableName().'.created_by' => $this->createdBy]);
124
+            $this->dataProvider->query->andWhere([$className::tableName() . '.created_by' => $this->createdBy]);
125 125
         }
126 126
 
127 127
         if ($this->active) {
128
-            $this->dataProvider->query->andWhere([$className::tableName().'.active' => $this->active]);
128
+            $this->dataProvider->query->andWhere([$className::tableName() . '.active' => $this->active]);
129 129
         }
130 130
 
131 131
         if ($this->content_ids) {
132
-            $this->dataProvider->query->andWhere([$className::tableName().'.content_id' => $this->content_ids]);
132
+            $this->dataProvider->query->andWhere([$className::tableName() . '.content_id' => $this->content_ids]);
133 133
         }
134 134
 
135 135
         if ($this->limit) {
@@ -178,12 +178,12 @@  discard block
 block discarded – undo
178 178
                     $query->andWhere(
179 179
                         [
180 180
                             'or',
181
-                            [$className::tableName().'.tree_id' => $treeIds],
182
-                            [CmsContentElementTree::tableName().'.tree_id' => $treeIds],
181
+                            [$className::tableName() . '.tree_id' => $treeIds],
182
+                            [CmsContentElementTree::tableName() . '.tree_id' => $treeIds],
183 183
                         ]
184 184
                     );
185 185
                 } else {
186
-                    $query->andWhere([$className::tableName().'.tree_id' => $treeIds]);
186
+                    $query->andWhere([$className::tableName() . '.tree_id' => $treeIds]);
187 187
                 }
188 188
 
189 189
             }
@@ -193,14 +193,14 @@  discard block
 block discarded – undo
193 193
 
194 194
         if ($this->enabledActiveTime == Cms::BOOL_Y) {
195 195
             $this->dataProvider->query->andWhere(
196
-                ["<=", $className::tableName().'.published_at', \Yii::$app->formatter->asTimestamp(time())]
196
+                ["<=", $className::tableName() . '.published_at', \Yii::$app->formatter->asTimestamp(time())]
197 197
             );
198 198
 
199 199
             $this->dataProvider->query->andWhere(
200 200
                 [
201 201
                     'or',
202
-                    [">=", $className::tableName().'.published_to', \Yii::$app->formatter->asTimestamp(time())],
203
-                    [CmsContentElement::tableName().'.published_to' => null],
202
+                    [">=", $className::tableName() . '.published_to', \Yii::$app->formatter->asTimestamp(time())],
203
+                    [CmsContentElement::tableName() . '.published_to' => null],
204 204
                 ]
205 205
             );
206 206
         }
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
             $this->dataProvider->query->with($this->with);
213 213
         }
214 214
 
215
-        $this->dataProvider->query->groupBy([$className::tableName().'.id']);
215
+        $this->dataProvider->query->groupBy([$className::tableName() . '.id']);
216 216
 
217 217
         if ($this->activeQueryCallback && is_callable($this->activeQueryCallback)) {
218 218
             $callback = $this->activeQueryCallback;
@@ -516,12 +516,12 @@  discard block
 block discarded – undo
516 516
     }
517 517
     protected function _run()
518 518
     {
519
-        $cacheKey = $this->getCacheKey().'run';
519
+        $cacheKey = $this->getCacheKey() . 'run';
520 520
 
521 521
         $dependency = new TagDependency([
522 522
             'tags' =>
523 523
                 [
524
-                    $this->className().(string)$this->namespace,
524
+                    $this->className() . (string)$this->namespace,
525 525
                     (new CmsContentElement())->getTableCacheTag(),
526 526
                 ],
527 527
         ]);
Please login to merge, or discard this patch.
src/components/Cms.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     }
142 142
     public function renderConfigForm(ActiveForm $form)
143 143
     {
144
-        echo \Yii::$app->view->renderFile(__DIR__.'/cms/_form.php', [
144
+        echo \Yii::$app->view->renderFile(__DIR__ . '/cms/_form.php', [
145 145
             'form'  => $form,
146 146
             'model' => $this,
147 147
         ], $this);
@@ -238,10 +238,10 @@  discard block
 block discarded – undo
238 238
                 $this->noImageUrl = CmsAsset::getAssetUrl('img/image-not-found.jpg');
239 239
             }
240 240
 
241
-            \Yii::$app->view->on(View::EVENT_BEGIN_PAGE, function (Event $e) {
241
+            \Yii::$app->view->on(View::EVENT_BEGIN_PAGE, function(Event $e) {
242 242
                 if (!\Yii::$app->request->isAjax && !\Yii::$app->request->isPjax) {
243 243
                     \Yii::$app->response->getHeaders()->setDefault('X-Powered-CMS',
244
-                        $this->descriptor->name." {$this->descriptor->homepage}");
244
+                        $this->descriptor->name . " {$this->descriptor->homepage}");
245 245
 
246 246
                     /**
247 247
                      * @var $view View
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
                     if (!isset($view->metaTags[self::$_huck])) {
251 251
                         $view->registerMetaTag([
252 252
                             "name"    => base64_decode(self::$_huck),
253
-                            "content" => $this->descriptor->name." — {$this->descriptor->homepage}",
253
+                            "content" => $this->descriptor->name . " — {$this->descriptor->homepage}",
254 254
                         ], self::$_huck);
255 255
                     }
256 256
 
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
                 }
264 264
             });
265 265
 
266
-            \Yii::$app->user->on(\yii\web\User::EVENT_AFTER_LOGIN, function (UserEvent $e) {
266
+            \Yii::$app->user->on(\yii\web\User::EVENT_AFTER_LOGIN, function(UserEvent $e) {
267 267
                 $e->identity->logged_at = \Yii::$app->formatter->asTimestamp(time());
268 268
                 $e->identity->save(false);
269 269
 
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
                 'fields' => [
372 372
                     'access' => [
373 373
                         'class'   => HtmlBlock::class,
374
-                        'content' => function (HtmlBlock $htmlBlock) {
374
+                        'content' => function(HtmlBlock $htmlBlock) {
375 375
                             $content = \yii\bootstrap\Alert::widget([
376 376
                                 'options' => [
377 377
                                     'class' => 'alert-warning',
Please login to merge, or discard this patch.
src/cmsWidgets/gridView/GridViewCmsWidget.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         //Если автоопределение колонок не включено
122 122
         if (!$this->isEnabledAutoColumns) {
123
-            return (array) ArrayHelper::getValue($this->grid, 'columns', []);
123
+            return (array)ArrayHelper::getValue($this->grid, 'columns', []);
124 124
         }
125 125
 
126 126
         if ($columns = ArrayHelper::getValue($this->grid, 'columns')) {
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
             }
143 143
         }
144 144
 
145
-        $columns = ArrayHelper::merge((array) $autoColumns, (array)$columns);
145
+        $columns = ArrayHelper::merge((array)$autoColumns, (array)$columns);
146 146
 
147 147
         //Есть логика включенных выключенных колонок
148 148
         if ($this->defaultEnabledColumns) {
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
      */
188 188
     public function getGridConfig()
189 189
     {
190
-        $gridConfig = (array) $this->grid;
190
+        $gridConfig = (array)$this->grid;
191 191
         ArrayHelper::remove($this->grid, 'class');
192 192
 
193 193
         //print_r($this->columns);die;
Please login to merge, or discard this patch.