Passed
Push — master ( 34a8e1...345dac )
by Mihail
04:51
created
Apps/Model/Admin/Content/FormCategoryUpdate.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     public function __construct(ContentCategory $record, $dependId = null)
37 37
     {
38 38
         $this->_record = $record;
39
-        $this->_tmpDependId = (int)$dependId;
39
+        $this->_tmpDependId = (int) $dependId;
40 40
         parent::__construct();
41 41
     }
42 42
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         ];
114 114
 
115 115
         // general category
116
-        if ($this->_new === false && (int)$this->_record->id === 1) {
116
+        if ($this->_new === false && (int) $this->_record->id === 1) {
117 117
             $rules[] = ['path', 'used'];
118 118
         } else {
119 119
             $rules[] = ['path', 'required'];
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
             $rules[] = ['path', 'reverse_match', '/[\/\'~`\!@#\$%\^&\*\(\)+=\{\}\[\]\|;:"\<\>,\?\\\]/'];
123 123
         }
124 124
 
125
-        $rules[] = ['title.' . App::$Request->getLanguage(), 'required'];
125
+        $rules[] = ['title.'.App::$Request->getLanguage(), 'required'];
126 126
 
127 127
 
128 128
         return $rules;
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     {
136 136
         $this->_record->title = $this->title;
137 137
         $this->_record->description = $this->description;
138
-        $savePath = trim($this->_pathNested . '/' . $this->path, '/');
138
+        $savePath = trim($this->_pathNested.'/'.$this->path, '/');
139 139
         $this->_record->path = $savePath;
140 140
         $this->_record->configs = $this->configs;
141 141
         $this->_record->save();
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         // build path with owner category
171 171
         $this->_pathNested = $owner->path;
172 172
         if (Str::length($this->_pathNested) > 0) {
173
-            $path = $this->_pathNested . '/' . $path;
173
+            $path = $this->_pathNested.'/'.$path;
174 174
         }
175 175
 
176 176
         // make select for check
Please login to merge, or discard this patch.
Apps/Model/Admin/Content/FormContentUpdate.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         if (!$this->_content->id) {
61 61
             $this->_new = true;
62 62
             if (!$this->galleryFreeId) {
63
-                $this->galleryFreeId = '_tmp_' . Str::randomLatin(mt_rand(16, 32));
63
+                $this->galleryFreeId = '_tmp_'.Str::randomLatin(mt_rand(16, 32));
64 64
             }
65 65
 
66 66
             if (!$this->authorId) {
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
     public function rules(): array
96 96
     {
97 97
         $res = [
98
-            ['title.' . App::$Request->getLanguage(), 'required'],
99
-            ['text.' . App::$Request->getLanguage(), 'required'],
98
+            ['title.'.App::$Request->getLanguage(), 'required'],
99
+            ['text.'.App::$Request->getLanguage(), 'required'],
100 100
             ['text', 'used'],
101 101
             ['path', 'reverse_match', '/[\/\'~`\!@#\$%\^&\*\(\)+=\{\}\[\]\|;:"\<\>,\?\\\]/'],
102 102
             [['path', 'categoryId', 'authorId', 'display', 'galleryFreeId', 'title', 'important'], 'required'],
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
         ];
110 110
 
111 111
         foreach (App::$Properties->get('languages') as $lang) {
112
-            $res[] = ['title.' . $lang, 'length_max', 120, null, true, true];
113
-            $res[] = ['keywords.' . $lang, 'length_max', 150];
114
-            $res[] = ['description.' . $lang, 'length_max', 250];
112
+            $res[] = ['title.'.$lang, 'length_max', 120, null, true, true];
113
+            $res[] = ['keywords.'.$lang, 'length_max', 150];
114
+            $res[] = ['description.'.$lang, 'length_max', 250];
115 115
         }
116 116
 
117 117
         return $res;
@@ -167,10 +167,10 @@  discard block
 block discarded – undo
167 167
         $this->_content->meta_keywords = $this->metaKeywords;
168 168
         $this->_content->meta_description = $this->metaDescription;
169 169
         $this->_content->source = $this->source;
170
-        $this->_content->important = (int)$this->important;
170
+        $this->_content->important = (int) $this->important;
171 171
         // check if rating is changed
172
-        if ((int)$this->addRating !== 0) {
173
-            $this->_content->rating += (int)$this->addRating;
172
+        if ((int) $this->addRating !== 0) {
173
+            $this->_content->rating += (int) $this->addRating;
174 174
         }
175 175
         // check if special comment hash is exist
176 176
         if ($this->_new || Str::length($this->_content->comment_hash) < 32) {
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         }
184 184
 
185 185
         // save poster data
186
-        $posterPath = '/upload/gallery/' . $this->galleryFreeId . '/orig/' . $this->poster;
186
+        $posterPath = '/upload/gallery/'.$this->galleryFreeId.'/orig/'.$this->poster;
187 187
         if (File::exist($posterPath)) {
188 188
             $this->_content->poster = $this->poster;
189 189
         }
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
         // move files
220 220
         if ($tmpGalleryId !== $this->_content->id) {
221
-            Directory::rename('/upload/gallery/' . $tmpGalleryId, $this->_content->id);
221
+            Directory::rename('/upload/gallery/'.$tmpGalleryId, $this->_content->id);
222 222
         }
223 223
     }
224 224
 
Please login to merge, or discard this patch.
Apps/View/Admin/default/content/category_list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 <h1><?= __('Category list') ?></h1>
26 26
 <div class="row">
27 27
     <div class="col-md-12">
28
-        <?= Url::a(['content/categoryupdate'], '<i class="fa fa-plus"></i> ' . __('Add category'), ['class' => 'btn btn-primary', 'html' => true]) ?>
28
+        <?= Url::a(['content/categoryupdate'], '<i class="fa fa-plus"></i> '.__('Add category'), ['class' => 'btn btn-primary', 'html' => true]) ?>
29 29
     </div>
30 30
 </div>
31 31
 <div class="table-responsive">
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
             <tr>
57 57
                 <td>
58 58
                     <div class="row">
59
-                        <div class="d-none d-md-block col-md-<?= $offset ?> col-xs-<?= $offset+2 ?> " style="border-bottom: 2px solid #8a8a8a;height: 1px;padding-top: 10px;"></div>
60
-                        <div class="col-md-<?= $set ?> col-xs-<?= $set-2 ?>">
59
+                        <div class="d-none d-md-block col-md-<?= $offset ?> col-xs-<?= $offset + 2 ?> " style="border-bottom: 2px solid #8a8a8a;height: 1px;padding-top: 10px;"></div>
60
+                        <div class="col-md-<?= $set ?> col-xs-<?= $set - 2 ?>">
61 61
                             <?= $row->getLocaled('title') ?>
62 62
                             <sup>id: <?= $row->id ?></sup>
63 63
                             <span class="badge badge-secondary">/<?= $row->path ?></span>
Please login to merge, or discard this patch.
Apps/View/Admin/default/content/category_update.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@
 block discarded – undo
32 32
     $menu->menu([
33 33
         'text' => Str::upperCase($lang),
34 34
         'tab' => function() use ($form, $lang) {
35
-            return $form->fieldset()->text('title.' . $lang, null, __('Enter category title, visible for users')) .
36
-                $form->fieldset()->text('description.' . $lang, null, __('Enter category description'));
35
+            return $form->fieldset()->text('title.'.$lang, null, __('Enter category title, visible for users')).
36
+                $form->fieldset()->text('description.'.$lang, null, __('Enter category description'));
37 37
         },
38 38
         'tabActive' => $lang === \App::$Request->getLanguage()
39 39
     ]);
Please login to merge, or discard this patch.