Completed
Push — master ( 6e0e1d...0afdc4 )
by Alexey
04:12
created
system/modules/Ecommerce/models/Item/Offer/Param.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 
56 56
     public function realType()
57 57
     {
58
-        if ($this->option && $this->option->type)  {
58
+        if ($this->option && $this->option->type) {
59 59
             $type = $this->option->type;
60 60
 
61 61
             if ($type == 'select') {
Please login to merge, or discard this patch.
system/modules/Ecommerce/models/Item/Offer.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                 'col' => 'item_offer_id',
77 77
                 //'resultKey' => 'code',
78 78
                 'resultKey' => 'item_offer_option_id',
79
-                'join' => [Offer\Option::table(), Offer\Option::index() . ' = ' . Offer\Param::colPrefix() . Offer\Option::index()]
79
+                'join' => [Offer\Option::table(), Offer\Option::index().' = '.Offer\Param::colPrefix().Offer\Option::index()]
80 80
             ],
81 81
             'item' => [
82 82
                 'model' => 'Ecommerce\Item',
@@ -89,12 +89,12 @@  discard block
 block discarded – undo
89 89
     {
90 90
         $warehouse = Offer\Warehouse::get([['count', '0', '>'], ['item_offer_id', $this->id]]);
91 91
         if ($warehouse) {
92
-            $warehouse->count +=(float) $count;
92
+            $warehouse->count += (float) $count;
93 93
             $warehouse->save();
94 94
         } else {
95 95
             $warehouse = Offer\Warehouse::get([['item_offer_id', $this->id]]);
96 96
             if ($warehouse) {
97
-                $warehouse->count +=(float) $count;
97
+                $warehouse->count += (float) $count;
98 98
                 $warehouse->save();
99 99
             }
100 100
         }
@@ -112,21 +112,21 @@  discard block
 block discarded – undo
112 112
             }
113 113
         }
114 114
         if ($warehouseIds) {
115
-            \App::$cur->db->where(\Ecommerce\Item\Offer\Warehouse::colPrefix() . \Ecommerce\Warehouse::index(), $warehouseIds, 'IN');
115
+            \App::$cur->db->where(\Ecommerce\Item\Offer\Warehouse::colPrefix().\Ecommerce\Warehouse::index(), $warehouseIds, 'IN');
116 116
         }
117
-        \App::$cur->db->where(\Ecommerce\Item\Offer\Warehouse::colPrefix() . \Ecommerce\Item\Offer::index(), $this->id);
118
-        \App::$cur->db->cols = 'COALESCE(sum(' . \Ecommerce\Item\Offer\Warehouse::colPrefix() . 'count),0) as `sum` ';
117
+        \App::$cur->db->where(\Ecommerce\Item\Offer\Warehouse::colPrefix().\Ecommerce\Item\Offer::index(), $this->id);
118
+        \App::$cur->db->cols = 'COALESCE(sum('.\Ecommerce\Item\Offer\Warehouse::colPrefix().'count),0) as `sum` ';
119 119
         $warehouse = \App::$cur->db->select(\Ecommerce\Item\Offer\Warehouse::table())->fetch();
120 120
 
121
-        \App::$cur->db->cols = 'COALESCE(sum(' . \Ecommerce\Warehouse\Block::colPrefix() . 'count) ,0) as `sum` ';
122
-        \App::$cur->db->where(\Ecommerce\Warehouse\Block::colPrefix() . \Ecommerce\Item\Offer::index(), $this->id);
121
+        \App::$cur->db->cols = 'COALESCE(sum('.\Ecommerce\Warehouse\Block::colPrefix().'count) ,0) as `sum` ';
122
+        \App::$cur->db->where(\Ecommerce\Warehouse\Block::colPrefix().\Ecommerce\Item\Offer::index(), $this->id);
123 123
         if ($cart_id) {
124
-            \App::$cur->db->where(\Ecommerce\Warehouse\Block::colPrefix() . \Ecommerce\Cart::index(), (int) $cart_id, '!=');
124
+            \App::$cur->db->where(\Ecommerce\Warehouse\Block::colPrefix().\Ecommerce\Cart::index(), (int) $cart_id, '!=');
125 125
         }
126 126
         $on = '
127
-            ' . \Ecommerce\Cart::index() . ' = ' . \Ecommerce\Warehouse\Block::colPrefix() . \Ecommerce\Cart::index() . ' AND (
128
-            (`' . \Ecommerce\Cart::colPrefix() . 'warehouse_block` = 1 and `' . \Ecommerce\Cart::colPrefix() . 'cart_status_id` in(2,3,6)) || 
129
-            (`' . \Ecommerce\Cart::colPrefix() . 'cart_status_id` in(0,1) and `' . \Ecommerce\Cart::colPrefix() . 'date_last_activ` >=subdate(now(),INTERVAL 30 MINUTE))
127
+            ' . \Ecommerce\Cart::index().' = '.\Ecommerce\Warehouse\Block::colPrefix().\Ecommerce\Cart::index().' AND (
128
+            (`' . \Ecommerce\Cart::colPrefix().'warehouse_block` = 1 and `'.\Ecommerce\Cart::colPrefix().'cart_status_id` in(2,3,6)) || 
129
+            (`' . \Ecommerce\Cart::colPrefix().'cart_status_id` in(0,1) and `'.\Ecommerce\Cart::colPrefix().'date_last_activ` >=subdate(now(),INTERVAL 30 MINUTE))
130 130
             )
131 131
         ';
132 132
         \App::$cur->db->join(\Ecommerce\Cart::table(), $on, 'inner');
Please login to merge, or discard this patch.
system/modules/Ui/Controllers/UiController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,25 +38,25 @@
 block discarded – undo
38 38
             $return = new Server\Result();
39 39
             ob_start();
40 40
             $form->checkRequest($params, true);
41
-            $_GET['item'] = get_class($form->model) . ($model->pk() ? ':' . $model->pk() : '');
41
+            $_GET['item'] = get_class($form->model).($model->pk() ? ':'.$model->pk() : '');
42 42
             $get = $_GET;
43 43
             if (isset($get['notSave'])) {
44 44
                 unset($get['notSave']);
45 45
             }
46
-            $form->action = (App::$cur->system ? '/' . App::$cur->name : '') . '/ui/formPopUp/?' . http_build_query($get);
46
+            $form->action = (App::$cur->system ? '/'.App::$cur->name : '').'/ui/formPopUp/?'.http_build_query($get);
47 47
             $form->draw($params, true);
48 48
             $return->content = ob_get_contents();
49 49
             ob_end_clean();
50 50
             $return->send();
51 51
         } else {
52 52
             $form->checkRequest($params);
53
-            $_GET['item'] = get_class($form->model) . ($model->pk() ? ':' . $model->pk() : '');
53
+            $_GET['item'] = get_class($form->model).($model->pk() ? ':'.$model->pk() : '');
54 54
             $get = $_GET;
55 55
             if (isset($get['notSave'])) {
56 56
                 unset($get['notSave']);
57 57
             }
58
-            $form->action = (App::$cur->system ? '/' . App::$cur->name : '') . '/ui/formPopUp/?' . http_build_query($get);
59
-            $this->view->setTitle(($model && $model->pk() ? 'Изменить ' : 'Создать ') . $form->header);
58
+            $form->action = (App::$cur->system ? '/'.App::$cur->name : '').'/ui/formPopUp/?'.http_build_query($get);
59
+            $this->view->setTitle(($model && $model->pk() ? 'Изменить ' : 'Создать ').$form->header);
60 60
             $this->view->page(['content' => 'form', 'data' => compact('form', 'params')]);
61 61
         }
62 62
     }
Please login to merge, or discard this patch.
system/modules/Money/snippets/rewardType/currency.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     'procent' => 'Процент',
22 22
     'amount' => 'Сумма',
23 23
 ];
24
-return $levelTypes[$level->params['type']->value] . ': ' . $level->params['amount']->value . ' ' . ($level->params['type']->value == 'procent' ? '%' : ($level->params['currency_id']->value ? \Money\Currency::get($level->params['currency_id']->value)->acronym() : ''));
24
+return $levelTypes[$level->params['type']->value].': '.$level->params['amount']->value.' '.($level->params['type']->value == 'procent' ? '%' : ($level->params['currency_id']->value ? \Money\Currency::get($level->params['currency_id']->value)->acronym() : ''));
25 25
 },
26 26
     'rewarder' => function($reward, $sums, $user, $rootUser, $level, $rewardGet) {
27 27
 $wallets = \App::$cur->money->getUserWallets($user->id);
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
         return 0;
64 64
     }
65 65
 
66
-    $text = 'Вознаграждение по программе "' . $reward->name . '"';
66
+    $text = 'Вознаграждение по программе "'.$reward->name.'"';
67 67
     if ($rootUser->id != $user->id) {
68
-        $text .= ' от ' . $rootUser->name();
68
+        $text .= ' от '.$rootUser->name();
69 69
     }
70 70
 
71 71
     if (!$rewardGet && $reward->block) {
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         $block->wallet_id = $wallets[$level->params['currency_id']->value]->id;
74 74
         $block->amount = $amount;
75 75
         $block->comment = $text;
76
-        $block->data = 'reward:' . $reward->id;
76
+        $block->data = 'reward:'.$reward->id;
77 77
         $dateGenerators = \App::$cur->money->getSnippets('expiredDateGenerator');
78 78
         if ($reward->block_date_expired && !empty($dateGenerators[$reward->block_date_expired])) {
79 79
             $date = $dateGenerators[$reward->block_date_expired]($reward, $user);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     } else {
89 89
         $wallets[$level->params['currency_id']->value]->diff($amount, $text);
90 90
     }
91
-    \App::$cur->users->AddUserActivity($user->id, 4, $text . '<br />' . $amount . ' ' . $wallets[$level->params['currency_id']->value]->currency->acronym());
91
+    \App::$cur->users->AddUserActivity($user->id, 4, $text.'<br />'.$amount.' '.$wallets[$level->params['currency_id']->value]->currency->acronym());
92 92
 }
93 93
 return $amount;
94 94
 }
Please login to merge, or discard this patch.
system/modules/Widgets/appAdminControllers/content/widgetChooser.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@
 block discarded – undo
29 29
 <select class ='form-control' id = 'widgetChooser' onchange="selectChange(this);">
30 30
   <option value = ''>Выберите виджет</option>
31 31
   <?php
32
-  foreach ($widgets as $code => $options) {
33
-      $name = is_string($options) ? $options : $options['name'];
34
-      echo "<option value = '{$code}' data-filename='{$code}'>{$name}</option>";
35
-  }
36
-  ?>
32
+    foreach ($widgets as $code => $options) {
33
+        $name = is_string($options) ? $options : $options['name'];
34
+        echo "<option value = '{$code}' data-filename='{$code}'>{$name}</option>";
35
+    }
36
+    ?>
37 37
 </select>
38 38
 <?php
39 39
 foreach ($widgets as $code => $options) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 </select>
38 38
 <?php
39 39
 foreach ($widgets as $code => $options) {
40
-    echo "<div id = 'params_" . str_replace('\\', '-', $code) . "' class = 'widgetParams' style='display:none;'>";
40
+    echo "<div id = 'params_".str_replace('\\', '-', $code)."' class = 'widgetParams' style='display:none;'>";
41 41
     if (isset($options['params']) && !is_array($options['params'])) {
42 42
         $options['params']();
43 43
     } elseif (isset($options['params'])) {
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                 if ($param['type'] == 'select') {
49 49
                     echo "<div class = 'form-group'>
50 50
                         <label>{$param['name']}</label>
51
-                        <select name = 'params[" . str_replace('\\', '-', $code) . "][]' class = 'form-control' >";
51
+                        <select name = 'params[".str_replace('\\', '-', $code)."][]' class = 'form-control' >";
52 52
                     foreach ($param['model']::get_list() as $item) {
53 53
                         echo "<option value = '{$item->pk()}'>{$item->$param['showCol']}</option>";
54 54
                     }
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
                 } elseif ($param['type'] == 'textarea') {
58 58
                     echo "<div class = 'form-group'>
59 59
                         <label>{$param['name']}</label>
60
-                        <textarea name = 'params[" . str_replace('\\', '-', $code) . "][]' class = 'form-control'></textarea>
60
+                        <textarea name = 'params[".str_replace('\\', '-', $code)."][]' class = 'form-control'></textarea>
61 61
                         </div>";
62 62
                 } else {
63 63
                     echo "<div class = 'form-group'>
64 64
                         <label>{$param['name']}</label>
65
-                        <input name = 'params[" . str_replace('\\', '-', $code) . "][]' class = 'form-control' />
65
+                        <input name = 'params[".str_replace('\\', '-', $code)."][]' class = 'form-control' />
66 66
                         </div>";
67 67
                 }
68 68
             }
Please login to merge, or discard this patch.
system/modules/View/appAdminControllers/content/Template/chooseFile.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@
 block discarded – undo
3 3
 <hr/>
4 4
 <?php
5 5
 foreach ($template->config['css'] as $file) {
6
-    if (file_exists($template->path . '/css/' . $file)) {
6
+    if (file_exists($template->path.'/css/'.$file)) {
7 7
         ?>
8
-        <a href ='/admin/view/template/editFile/<?= $template->name; ?>?path=<?= 'css/' . $file; ?>'><?= $file; ?></a>
8
+        <a href ='/admin/view/template/editFile/<?= $template->name; ?>?path=<?= 'css/'.$file; ?>'><?= $file; ?></a>
9 9
         <?php
10 10
     }
11 11
 }
Please login to merge, or discard this patch.
system/modules/Sitemap/Sitemap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     {
28 28
         header("Content-Type: text/xml");
29 29
         header("Expires: Thu, 19 Feb 1998 13:24:18 GMT");
30
-        header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
30
+        header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
31 31
         header("Cache-Control: no-cache, must-revalidate");
32 32
         header("Cache-Control: post-check=0,pre-check=0");
33 33
         header("Cache-Control: max-age=0");
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $root->setAttribute("xmlns", "http://www.sitemaps.org/schemas/sitemap/0.9");
40 40
         $root = $xml->appendChild($root);
41 41
 
42
-        $addToXml = function ($xml, $parent, $nodeName, $text) {
42
+        $addToXml = function($xml, $parent, $nodeName, $text) {
43 43
             $node = $parent->appendChild($xml->createElement($nodeName));
44 44
             $node->appendChild($xml->createTextNode($text));
45 45
             return $node;
Please login to merge, or discard this patch.
system/modules/Sitemap/install_script.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-return function ($step = NULL, $params = []) {
3
+return function($step = NULL, $params = []) {
4 4
 
5 5
     $groups = [
6 6
         [
Please login to merge, or discard this patch.
system/modules/Materials/Materials.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
         if (!empty($conf['files']['aditionTemplateFiels'])) {
43 43
             foreach ($conf['files']['aditionTemplateFiels'] as $file) {
44
-                $return[$file['file']] = '- ' . $file['name'];
44
+                $return[$file['file']] = '- '.$file['name'];
45 45
             }
46 46
         }
47 47
         return $return;
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         if (!empty($conf['files']['aditionTemplateFiels'])) {
79 79
             foreach ($conf['files']['aditionTemplateFiels'] as $file) {
80
-                $return[$file['file']] = '- ' . $file['name'];
80
+                $return[$file['file']] = '- '.$file['name'];
81 81
             }
82 82
         }
83 83
         return $return;
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             $map[] = [
92 92
                 'name' => $mat->name,
93 93
                 'url' => [
94
-                    'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . INJI_DOMAIN_NAME . ($mat->getHref())
94
+                    'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http').'://'.INJI_DOMAIN_NAME.($mat->getHref())
95 95
                 ],
96 96
             ];
97 97
         }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                 $map[] = [
105 105
                     'name' => $mat->name,
106 106
                     'url' => [
107
-                        'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . INJI_DOMAIN_NAME . ($mat->getHref())
107
+                        'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http').'://'.INJI_DOMAIN_NAME.($mat->getHref())
108 108
                     ],
109 109
                 ];
110 110
             }
Please login to merge, or discard this patch.