Test Setup Failed
Push — master ( deccd1...87a1fa )
by Александр
75:00 queued 34:57
created
src/migrations/v3/m141106_100557_create_user_group_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 
52 52
             'status'                => Schema::TYPE_SMALLINT . ' NOT NULL DEFAULT 10',
53 53
 
54
-            'files'                 => Schema::TYPE_TEXT. ' NULL', //
54
+            'files'                 => Schema::TYPE_TEXT . ' NULL', //
55 55
 
56 56
         ], $tableOptions);
57 57
 
Please login to merge, or discard this patch.
migrations/v3/m150523_103525_create_table__cms_tree_type_property_enum.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@
 block discarded – undo
36 36
 
37 37
             'value'                 => Schema::TYPE_STRING . '(255) NOT NULL',
38 38
             'def'                   => "CHAR(1) NOT NULL DEFAULT 'N'",
39
-            'code'                  => Schema::TYPE_STRING. '(32) NOT NULL',
40
-            'priority'              => Schema::TYPE_INTEGER. "(11) NOT NULL DEFAULT '500'",
39
+            'code'                  => Schema::TYPE_STRING . '(32) NOT NULL',
40
+            'priority'              => Schema::TYPE_INTEGER . "(11) NOT NULL DEFAULT '500'",
41 41
 
42 42
         ], $tableOptions);
43 43
 
Please login to merge, or discard this patch.
src/console/controllers/UpdateController.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,8 +100,8 @@
 block discarded – undo
100 100
          * @var $element CmsContentElement
101 101
          */
102 102
         foreach (CmsContentElement::find()
103
-                     //->orderBy(['id' => SORT_ASC])
104
-                     ->each(10) as $element) {
103
+                        //->orderBy(['id' => SORT_ASC])
104
+                        ->each(10) as $element) {
105 105
             $this->stdout("\t Element: {$element->id}", Console::FG_YELLOW);
106 106
 
107 107
             if ($element->relatedPropertiesModel->save()) {
Please login to merge, or discard this patch.
src/views/admin-cms-content-element/_form.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         <?= $form->fieldSet(\Yii::t('skeeks/cms', 'Access')); ?>
149 149
         <?= \skeeks\cms\rbac\widgets\adminPermissionForRoles\AdminPermissionForRolesWidget::widget([
150 150
             'permissionName'        => $model->permissionName,
151
-            'permissionDescription' => 'Доступ к этому элементу: '.$model->name,
151
+            'permissionDescription' => 'Доступ к этому элементу: ' . $model->name,
152 152
             'label'                 => 'Доступ к этому элементу',
153 153
         ]); ?>
154 154
         <?= $form->fieldSetEnd() ?>
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
             : ?>
180 180
             <?= \skeeks\cms\modules\admin\widgets\RelatedModelsGrid::widget([
181 181
                 'label'       => $childContent->name,
182
-                'namespace'   => md5($model->className().$childContent->id),
182
+                'namespace'   => md5($model->className() . $childContent->id),
183 183
                 'parentModel' => $model,
184 184
                 'relation'    => [
185 185
                     'content_id'                => $childContent->id,
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,9 +87,10 @@  discard block
 block discarded – undo
87 87
             <?php $model->content_id = $content_id; ?>
88 88
             <?= $form->field($model, 'content_id')->hiddenInput(['value' => $content_id])->label(false); ?>
89 89
         <?php endif; ?>
90
-    <?php else
90
+    <?php else {
91 91
         : ?>
92 92
         <?php $contentModel = $model->cmsContent;
93
+}
93 94
         ?>
94 95
     <?php endif; ?>
95 96
 
@@ -175,7 +176,7 @@  discard block
 block discarded – undo
175 176
                     ],
176 177
                 'body'    => \Yii::t('skeeks/cms', 'Management will be available after saving'),
177 178
             ]); ?>
178
-        <?php else
179
+        <?php else {
179 180
             : ?>
180 181
             <?= \skeeks\cms\modules\admin\widgets\RelatedModelsGrid::widget([
181 182
                 'label'       => $childContent->name,
@@ -198,6 +199,7 @@  discard block
 block discarded – undo
198 199
                     'columns' => (array)\skeeks\cms\controllers\AdminCmsContentElementController::getColumns($childContent),
199 200
                 ],
200 201
             ]);
202
+}
201 203
             ?>
202 204
 
203 205
         <?php endif; ?>
Please login to merge, or discard this patch.
src/models/CmsContentElement.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
             [
273 273
                 'tree_id',
274 274
                 'default',
275
-                'value' => function () {
275
+                'value' => function() {
276 276
                     if ($this->cmsContent->defaultTree) {
277 277
                         return $this->cmsContent->defaultTree->id;
278 278
                     }
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
             [
316 316
                 'parent_content_element_id',
317 317
                 'required',
318
-                'when'       => function (CmsContentElement $model) {
318
+                'when'       => function(CmsContentElement $model) {
319 319
 
320 320
                     if ($model->cmsContent && $model->cmsContent->parentContent) {
321 321
                         return (bool)($model->cmsContent->parent_content_is_required == "Y");
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
      */
535 535
     public function getPermissionName()
536 536
     {
537
-        return 'cms/cms-content-element__'.$this->id;
537
+        return 'cms/cms-content-element__' . $this->id;
538 538
     }
539 539
 
540 540
 
Please login to merge, or discard this patch.
src/controllers/UpaPersonalController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
                         $e->sender->formModels['dm'] = $dm;
105 105
                     },
106 106
 
107
-                    'on beforeSave' => function (Event $e) {
107
+                    'on beforeSave' => function(Event $e) {
108 108
                         /**
109 109
                          * @var $action BackendModelUpdateAction;
110 110
                          * @var $model CmsUser;
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.