Completed
Push — master ( 6e0e1d...0afdc4 )
by Alexey
04:12
created
system/modules/UserForms/UserForms.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,8 +16,9 @@
 block discarded – undo
16 16
         if (!empty($_POST['UserForms'])) {
17 17
             foreach ($_POST['UserForms'] as $form_id => $inputs) {
18 18
                 $form = \UserForms\Form::get((int) $form_id);
19
-                if (!$form)
20
-                    continue;
19
+                if (!$form) {
20
+                                    continue;
21
+                }
21 22
                 $formRecive = new \UserForms\Recive();
22 23
                 $formRecive->user_id = (int) \Users\User::$cur->id;
23 24
                 $formRecive->form_id = (int) $form_id;
Please login to merge, or discard this patch.
system/modules/Users/appAdminControllers/content/edit.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,10 +42,11 @@
 block discarded – undo
42 42
                             <select class="form-control" name = 'user_role_id'>
43 43
                                 <?php
44 44
                                 foreach ($roles as $role) {
45
-                                    if ($role['role_id'] == $user->user_role_id)
46
-                                        $selected = 'selected = "selected"';
47
-                                    else
48
-                                        $selected = '';
45
+                                    if ($role['role_id'] == $user->user_role_id) {
46
+                                                                            $selected = 'selected = "selected"';
47
+                                    } else {
48
+                                                                            $selected = '';
49
+                                    }
49 50
                                     echo "<option {$selected} value = '{$role['role_id']}'>{$role['role_name']}</option>";
50 51
                                 }
51 52
                                 ?>
Please login to merge, or discard this patch.
system/modules/View/appAdminControllers/content/index.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,13 +11,14 @@
 block discarded – undo
11 11
     '',
12 12
     ''
13 13
 ]);
14
-if (!empty($templates['app']['installed']))
14
+if (!empty($templates['app']['installed'])) {
15 15
     foreach ($templates['app']['installed'] as $template => $name) {
16 16
         $table->addRow([
17 17
             $name,
18 18
             (empty($templates['app']['current']) || $templates['app']['current'] != $template) ? '<a href = "/admin/view/setDefault/' . $template . '">Установить по умолчанию</a>' : 'Тема по умолчанию',
19 19
             '<a href = "/admin/view/editTemplate/' . $template . '">Редактировать</a>'
20 20
         ]);
21
+}
21 22
     }
22 23
 $table->draw();
23 24
 ?>
24 25
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Widgets/appAdminControllers/WidgetsController.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,9 @@
 block discarded – undo
36 36
                     $params = json_decode($widget->widget_params, true);
37 37
                     if ($params) {
38 38
                         foreach ($params as $param) {
39
-                            if (!isset($widgetCode[$i]))
40
-                                break;
39
+                            if (!isset($widgetCode[$i])) {
40
+                                                            break;
41
+                            }
41 42
                             if ($param['type'] == 'select') {
42 43
                                 $item = $param['model']::get($widgetCode[$i++]);
43 44
                                 if ($item) {
Please login to merge, or discard this patch.
system/objects/CodeGenerator.php 1 patch
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,20 +13,22 @@
 block discarded – undo
13 13
     static function genArray($data, $level = 0)
14 14
     {
15 15
         $return = '';
16
-        if ($level == 0)
17
-            $return = "[";
16
+        if ($level == 0) {
17
+                    $return = "[";
18
+        }
18 19
         foreach ($data as $key => $item) {
19 20
             $return .= "\n" . str_repeat(' ', ( $level * 4 + 4)) . "'{$key}' => ";
20
-            if (!is_array($item))
21
-                $return .= "'{$item}',";
22
-            else {
21
+            if (!is_array($item)) {
22
+                            $return .= "'{$item}',";
23
+            } else {
23 24
                 $return .= "[";
24 25
                 $return .= rtrim(self::genArray($item, $level + 1), ',');
25 26
                 $return .= "\n" . str_repeat(' ', ( $level * 4 + 4)) . "],";
26 27
             }
27 28
         }
28
-        if ($level == 0)
29
-            $return = rtrim($return, ',') . "\n];";
29
+        if ($level == 0) {
30
+                    $return = rtrim($return, ',') . "\n];";
31
+        }
30 32
 
31 33
         return $return;
32 34
     }
Please login to merge, or discard this patch.
system/Inji/Config.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,9 @@
 block discarded – undo
47 47
             return self::$_configs['custom'][$path];
48 48
         }
49 49
 
50
-        if (!file_exists($path))
51
-            return [];
50
+        if (!file_exists($path)) {
51
+                    return [];
52
+        }
52 53
 
53 54
         return self::$_configs['custom'][$path] = include $path;
54 55
     }
Please login to merge, or discard this patch.
system/modules/View/View.php 1 patch
Braces   +43 added lines, -32 removed lines patch added patch discarded remove patch
@@ -140,8 +140,9 @@  discard block
 block discarded – undo
140 140
 
141 141
     private function parseRaw($source)
142 142
     {
143
-        if (!$source)
144
-            return [];
143
+        if (!$source) {
144
+                    return [];
145
+        }
145 146
 
146 147
         preg_match_all("|{([^}]+)}|", $source, $result);
147 148
         return $result[1];
@@ -327,10 +328,11 @@  discard block
 block discarded – undo
327 328
                         $this->ResolveCssHref($css, $type, $hrefs);
328 329
                         continue;
329 330
                     }
330
-                    if (strpos($css, '//') !== false)
331
-                        $href = $css;
332
-                    else
333
-                        $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css;
331
+                    if (strpos($css, '//') !== false) {
332
+                                            $href = $css;
333
+                    } else {
334
+                                            $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css;
335
+                    }
334 336
                     $hrefs[$href] = $href;
335 337
                 }
336 338
                 break;
@@ -340,10 +342,11 @@  discard block
 block discarded – undo
340 342
                         $this->ResolveCssHref($css, $type, $hrefs);
341 343
                         continue;
342 344
                     }
343
-                    if (strpos($css, '://') !== false)
344
-                        $href = $css;
345
-                    else
346
-                        $href = $this->app->templatesPath . "/{$this->template->name}/css/{$css}";
345
+                    if (strpos($css, '://') !== false) {
346
+                                            $href = $css;
347
+                    } else {
348
+                                            $href = $this->app->templatesPath . "/{$this->template->name}/css/{$css}";
349
+                    }
347 350
                     $hrefs[$href] = $href;
348 351
                 }
349 352
                 break;
@@ -353,10 +356,11 @@  discard block
 block discarded – undo
353 356
                         $this->ResolveCssHref($css, $type, $hrefs);
354 357
                         continue;
355 358
                     }
356
-                    if (strpos($css, '//') !== false)
357
-                        $href = $css;
358
-                    else
359
-                        $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css;
359
+                    if (strpos($css, '//') !== false) {
360
+                                            $href = $css;
361
+                    } else {
362
+                                            $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css;
363
+                    }
360 364
                     $hrefs[$href] = $href;
361 365
                 }
362 366
                 break;
@@ -410,8 +414,9 @@  discard block
 block discarded – undo
410 414
         $noParsedScripts = [];
411 415
         foreach ($scripts as $script) {
412 416
             if (is_string($script)) {
413
-                if (!empty($urls[$script]))
414
-                    continue;
417
+                if (!empty($urls[$script])) {
418
+                                    continue;
419
+                }
415 420
 
416 421
                 $path = $this->app->staticLoader->parsePath($script);
417 422
                 if (file_exists($path)) {
@@ -422,8 +427,9 @@  discard block
 block discarded – undo
422 427
                     $noParsedScripts[$script] = $script;
423 428
                 }
424 429
             } elseif (!empty($script['file'])) {
425
-                if (!empty($urls[$script['file']]))
426
-                    continue;
430
+                if (!empty($urls[$script['file']])) {
431
+                                    continue;
432
+                }
427 433
 
428 434
                 $path = $this->app->staticLoader->parsePath($script['file']);
429 435
                 if (file_exists($path)) {
@@ -482,12 +488,14 @@  discard block
 block discarded – undo
482 488
                         $this->genScriptArray($js, $type, $resultArray);
483 489
                         continue;
484 490
                     }
485
-                    if (strpos($js, '//') !== false)
486
-                        $href = $js;
487
-                    else
488
-                        $href = $this->getHref('js', $js);
489
-                    if (!$href)
490
-                        continue;
491
+                    if (strpos($js, '//') !== false) {
492
+                                            $href = $js;
493
+                    } else {
494
+                                            $href = $this->getHref('js', $js);
495
+                    }
496
+                    if (!$href) {
497
+                                            continue;
498
+                    }
491 499
 
492 500
                     $resultArray[] = $href;
493 501
                 }
@@ -498,10 +506,11 @@  discard block
 block discarded – undo
498 506
                         $this->genScriptArray($js, $type, $resultArray);
499 507
                         continue;
500 508
                     }
501
-                    if (strpos($js, '//') !== false)
502
-                        $href = $js;
503
-                    else
504
-                        $href = $this->app->templatesPath . "/{$this->template->name}/js/{$js}";
509
+                    if (strpos($js, '//') !== false) {
510
+                                            $href = $js;
511
+                    } else {
512
+                                            $href = $this->app->templatesPath . "/{$this->template->name}/js/{$js}";
513
+                    }
505 514
                     $resultArray[] = $href;
506 515
                 }
507 516
                 break;
@@ -517,8 +526,9 @@  discard block
 block discarded – undo
517 526
                         $asset = [];
518 527
                     }
519 528
                     $asset['file'] = $this->getHref('js', $js);
520
-                    if (!$asset['file'])
521
-                        continue;
529
+                    if (!$asset['file']) {
530
+                                            continue;
531
+                    }
522 532
                     $resultArray[] = $asset;
523 533
                 }
524 534
                 break;
@@ -568,8 +578,9 @@  discard block
 block discarded – undo
568 578
                         $paramArray = true;
569 579
                     }
570 580
                 }
571
-                if (!$paramArray)
572
-                    $lineParams = ':' . implode(':', $_params);
581
+                if (!$paramArray) {
582
+                                    $lineParams = ':' . implode(':', $_params);
583
+                }
573 584
             }
574 585
         }
575 586
         echo "<!--start:{WIDGET:{$_widgetName}{$lineParams}}-->\n";
Please login to merge, or discard this patch.
system/modules/Ecommerce/appControllers/content/view.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,11 +18,13 @@
 block discarded – undo
18 18
             <ul class="item-options">
19 19
               <?php
20 20
               foreach ($item->options as $param) {
21
-                  if (!$param->item_option_view || !$param->value)
22
-                      continue;
21
+                  if (!$param->item_option_view || !$param->value) {
22
+                                        continue;
23
+                  }
23 24
                   if ($param->item_option_type == 'select') {
24
-                      if (empty($param->option->items[$param->value]))
25
-                          continue;
25
+                      if (empty($param->option->items[$param->value])) {
26
+                                                continue;
27
+                      }
26 28
                       $value = $param->option->items[$param->value]->value;
27 29
                   } else {
28 30
                       $value = $param->value;
Please login to merge, or discard this patch.
system/modules/Ecommerce/appControllers/content/Cart/index.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@
 block discarded – undo
3 3
     <div class="cart-order_page">
4 4
       <h2>Быстрое оформление заказа</h2>
5 5
       <?php
6
-      if (!$cart || !$cart->cartItems)
7
-          echo "<h1>Ваша корзина пуста</h1>";
8
-      else {
6
+      if (!$cart || !$cart->cartItems) {
7
+                echo "<h1>Ваша корзина пуста</h1>";
8
+      } else {
9 9
           $sums = [];
10 10
           $cartDelivery = $cart->delivery;
11 11
           $deliveryPrice = 0;
Please login to merge, or discard this patch.