Test Setup Failed
Push — master ( e99d3b...e4104b )
by Александр
52:12 queued 12:13
created
src/controllers/AdminCmsContentElementController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
             [
91 91
                 'class'     => \yii\grid\DataColumn::class,
92
-                'value'     => function (\skeeks\cms\models\CmsContentElement $model) {
92
+                'value'     => function(\skeeks\cms\models\CmsContentElement $model) {
93 93
                     if (!$model->cmsTree) {
94 94
                         return null;
95 95
                     }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                     if ($model->cmsTree->parents) {
100 100
                         foreach ($model->cmsTree->parents as $parent) {
101 101
                             if ($parent->isRoot()) {
102
-                                $path[] = "[".$parent->site->name."] ".$parent->name;
102
+                                $path[] = "[" . $parent->site->name . "] " . $parent->name;
103 103
                             } else {
104 104
                                 $path[] = $parent->name;
105 105
                             }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
             'additionalSections' => [
118 118
                 'class'   => \yii\grid\DataColumn::class,
119
-                'value'   => function (\skeeks\cms\models\CmsContentElement $model) {
119
+                'value'   => function(\skeeks\cms\models\CmsContentElement $model) {
120 120
                     $result = [];
121 121
 
122 122
                     if ($model->cmsContentElementTrees) {
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             [
145 145
                 'class'  => \yii\grid\DataColumn::class,
146 146
                 'label'  => "Смотреть",
147
-                'value'  => function (\skeeks\cms\models\CmsContentElement $model) {
147
+                'value'  => function(\skeeks\cms\models\CmsContentElement $model) {
148 148
 
149 149
                     return \yii\helpers\Html::a('<i class="glyphicon glyphicon-arrow-right"></i>', $model->absoluteUrl,
150 150
                         [
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
                     'visible'   => false,
191 191
                     'format'    => 'raw',
192 192
                     'class'     => \yii\grid\DataColumn::class,
193
-                    'value'     => function ($model, $key, $index) use ($name) {
193
+                    'value'     => function($model, $key, $index) use ($name) {
194 194
                         if (is_array($model->{$name})) {
195 195
                             return implode(",", $model->{$name});
196 196
                         } else {
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
             foreach ((array)ArrayHelper::getValue($formData, 'fields') as $code) {
506 506
                 if ($rpForSave->hasAttribute($code)) {
507 507
                     $rpForSave->setAttribute($code,
508
-                        ArrayHelper::getValue($formData, 'RelatedPropertiesModel.'.$code));
508
+                        ArrayHelper::getValue($formData, 'RelatedPropertiesModel.' . $code));
509 509
                 }
510 510
             }
511 511
 
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
         $unique = parent::getPermissionName();
550 550
 
551 551
         if ($this->content) {
552
-            $unique = $unique."__".$this->content->id;
552
+            $unique = $unique . "__" . $this->content->id;
553 553
         }
554 554
 
555 555
         return $unique;
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
                         ],
576 576
                 ]);
577 577
 
578
-                $this->_content = CmsContent::getDb()->cache(function ($db) use ($content_id) {
578
+                $this->_content = CmsContent::getDb()->cache(function($db) use ($content_id) {
579 579
                     return CmsContent::find()->where([
580 580
                         "id" => $content_id,
581 581
                     ])->one();
Please login to merge, or discard this patch.