Test Setup Failed
Push — master ( 786e7d...380045 )
by Александр
39:24
created
src/views/admin-component-settings/index.php 1 patch
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,10 +23,11 @@  discard block
 block discarded – undo
23 23
         </button>
24 24
         <small><?= \Yii::t('skeeks/cms',
25 25
                 'The settings for this component are stored in the database. This option will erase them from the database, but the component, restore the default values. As they have in the code the developer.') ?></small>
26
-    <?php else
26
+    <?php else {
27 27
         : ?>
28 28
         <small><?= \Yii::t('skeeks/cms', 'These settings not yet saved in the database') ?></small>
29 29
     <?php endif;
30
+}
30 31
     ?>
31 32
 </div>
32 33
 
@@ -41,9 +42,12 @@  discard block
 block discarded – undo
41 42
     ]))->render(); ?>
42 43
 <? elseif ($formContent = $component->renderConfigForm($form)) : ?>
43 44
     <?= $formContent; ?>
44
-<? else : ?>
45
+<? else {
46
+    : ?>
45 47
     Нет редактируемых настроек для данного компонента
46
-<? endif; ?>
48
+<? endif;
49
+}
50
+?>
47 51
 
48 52
 <?= $form->buttonsStandart($component); ?>
49 53
 
Please login to merge, or discard this patch.
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/cmsWidgets/gridView/GridViewCmsWidget.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
         if (is_array($model) || is_object($model)) {
136 136
             foreach ($model as $name => $value) {
137 137
                 if ($value === null || is_scalar($value) || is_callable([$value, '__toString'])) {
138
-                    $this->_autoColumns[] = (string) $name;
138
+                    $this->_autoColumns[] = (string)$name;
139 139
                 }
140 140
             }
141 141
         }
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.