Completed
Push — master ( b6f450...c3dfe8 )
by Alexey
07:02
created
system/modules/Ecommerce/models/Item.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             'size' => $_FILES['ActiveForm_simpleItem']['size']['Ecommerce\Item']['image'],
72 72
             'error' => $_FILES['ActiveForm_simpleItem']['error']['Ecommerce\Item']['image'],
73 73
                 ], [
74
-            'upload_code' => 'activeForm:' . 'Ecommerce\Item' . ':' . $item->pk(),
74
+            'upload_code' => 'activeForm:'.'Ecommerce\Item'.':'.$item->pk(),
75 75
             'accept_group' => 'image'
76 76
         ]);
77 77
         if ($file_id) {
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
                           'option' => ['type' => 'select', 'source' => 'model', 'model' => 'Ecommerce\Item\Offer\Option', 'label' => 'Свойство предложения'],
169 169
                           'value' => ['type' => 'dynamicType', 'typeSource' => 'selfMethod', 'selfMethod' => 'realType', 'label' => 'Значение'],
170 170
                       ]
171
-                  ],'label'=>'Параметры предложения'
171
+                  ], 'label'=>'Параметры предложения'
172 172
               ]
173 173
           ],
174 174
           'map' => [
@@ -225,17 +225,17 @@  discard block
 block discarded – undo
225 225
   public function beforeSave() {
226 226
 
227 227
     if ($this->id) {
228
-      $this->search_index = $this->name . ' ';
228
+      $this->search_index = $this->name.' ';
229 229
       if ($this->category) {
230
-        $this->search_index .= $this->category->name . ' ';
230
+        $this->search_index .= $this->category->name.' ';
231 231
       }
232 232
       if ($this->options) {
233 233
         foreach ($this->options as $option) {
234 234
           if ($option->item_option_searchable && $option->value) {
235 235
             if ($option->item_option_type != 'select') {
236
-              $this->search_index .= $option->value . ' ';
236
+              $this->search_index .= $option->value.' ';
237 237
             } elseif (!empty($option->option->items[$option->value])) {
238
-              $option->option->items[$option->value]->value . ' ';
238
+              $option->option->items[$option->value]->value.' ';
239 239
             }
240 240
           }
241 241
         }
@@ -246,9 +246,9 @@  discard block
 block discarded – undo
246 246
             foreach ($offer->options as $option) {
247 247
               if ($option->item_offer_option_searchable && $option->value) {
248 248
                 if ($option->item_offer_option_type != 'select') {
249
-                  $this->search_index .= $option->value . ' ';
249
+                  $this->search_index .= $option->value.' ';
250 250
                 } elseif (!empty($option->option->items[$option->value])) {
251
-                  $option->option->items[$option->value]->value . ' ';
251
+                  $option->option->items[$option->value]->value.' ';
252 252
                 }
253 253
               }
254 254
             }
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
             'col' => 'item_id',
272 272
             //'resultKey' => 'code',
273 273
             'resultKey' => 'item_option_id',
274
-            'join' => [Item\Option::table(), Item\Option::index() . ' = ' . Item\Param::colPrefix() . Item\Option::index()]
274
+            'join' => [Item\Option::table(), Item\Option::index().' = '.Item\Param::colPrefix().Item\Option::index()]
275 275
         ],
276 276
         'offers' => [
277 277
             'type' => 'many',
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
         $curPrice = $price;
308 308
       } elseif (
309 309
               (!$price->type->roles && !$curPrice) ||
310
-              ($price->type->roles && !$curPrice && strpos($price->type->roles, "|" . \Users\User::$cur->role_id . "|") !== false)
310
+              ($price->type->roles && !$curPrice && strpos($price->type->roles, "|".\Users\User::$cur->role_id."|") !== false)
311 311
       ) {
312 312
         $curPrice = $price;
313 313
       }
Please login to merge, or discard this patch.