Completed
Push — master ( 4e62c3...4a84db )
by Alexey
04:58
created
system/modules/Money/objects/MerchantHelper/Robokassa.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@
 block discarded – undo
44 44
             'SignatureValue' => $hash
45 45
         ];
46 46
         if (empty($config['test'])) {
47
-            \Tools::redirect('https://auth.robokassa.ru/Merchant/Index.aspx?' . http_build_query($data));
47
+            \Tools::redirect('https://auth.robokassa.ru/Merchant/Index.aspx?'.http_build_query($data));
48 48
         } else {
49
-            \Tools::redirect('http://test.robokassa.ru/Index.aspx?' . http_build_query($data));
49
+            \Tools::redirect('http://test.robokassa.ru/Index.aspx?'.http_build_query($data));
50 50
         }
51 51
     }
52 52
 
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/Money/Money.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             default:
46 46
                 $sum = $pay->sum;
47 47
         }
48
-        $className = 'Money\MerchantHelper\\' . $objectName;
48
+        $className = 'Money\MerchantHelper\\'.$objectName;
49 49
         return $className::goToMerchant($pay->id, $sum, $method['currency'], $merchantOptions['description'], $merchantOptions['success'], $merchantOptions['false']);
50 50
     }
51 51
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         if ($merchant) {
60 60
             $this->currentMerchant = $system;
61 61
         }
62
-        $className = 'Money\MerchantHelper\\' . $this->currentMerchant;
62
+        $className = 'Money\MerchantHelper\\'.$this->currentMerchant;
63 63
         $result = $className::reciver($data, $status);
64 64
         $result['pay'] = null;
65 65
         if (!empty($result['payId'])) {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             if (empty($blocks[$block->wallet->currency_id])) {
103 103
                 $blocks[$block->wallet->currency_id] = $block->amount;
104 104
             } else {
105
-                $blocks[$block->wallet->currency_id]+= $block->amount;
105
+                $blocks[$block->wallet->currency_id] += $block->amount;
106 106
             }
107 107
         }
108 108
         return $blocks;
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
             return false;
172 172
         }
173 173
         $reward->checkBlocked();
174
-        $reward_count = \Money\Reward\Recive::getCount([ 'where' => [ 'reward_id', $reward_id]]);
174
+        $reward_count = \Money\Reward\Recive::getCount(['where' => ['reward_id', $reward_id]]);
175 175
         if ($reward_count >= $reward->quantity && $reward->quantity) {
176 176
             return false;
177 177
         }
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
                 $recives = \Money\Reward\Recive::getList(['where' => [['user_id', $user->id], ['reward_id', $reward->id]]]);
212 212
                 $amount = 0;
213 213
                 foreach ($recives as $recive) {
214
-                    $amount+=$recive->amount;
214
+                    $amount += $recive->amount;
215 215
                 }
216 216
                 if ($amount >= $reward->peruser) {
217 217
                     continue;
Please login to merge, or discard this patch.
system/modules/Db/objects/Mysql/Mysql.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@  discard block
 block discarded – undo
13 13
 
14 14
 class Mysql extends \Object
15 15
 {
16
-    public $config = [];       // настройки подключения выбраной базы
17
-    public $connect = FALSE;        // ярлык соединения с MySQL
18
-    public $encoding = 'utf-8';        // установленная кодировка
19
-    public $db_name = 'test';         // выбраная в данный момент база
20
-    public $table_prefix = 'inji_';   // префикс названий таблиц
16
+    public $config = []; // настройки подключения выбраной базы
17
+    public $connect = FALSE; // ярлык соединения с MySQL
18
+    public $encoding = 'utf-8'; // установленная кодировка
19
+    public $db_name = 'test'; // выбраная в данный момент база
20
+    public $table_prefix = 'inji_'; // префикс названий таблиц
21 21
     public $pdo = NULL;
22 22
     public $lastQuery = '';
23 23
     public $last_error = '';
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $this->table_prefix = '';
72 72
 
73 73
         $query->where('TABLE_SCHEMA', $old_db);
74
-        $query->where('TABLE_NAME', $old_prefix . $table_name);
74
+        $query->where('TABLE_NAME', $old_prefix.$table_name);
75 75
         $result = $query->select('COLUMNS');
76 76
         $this->db_name = $old_db;
77 77
         $this->table_prefix = $old_prefix;
Please login to merge, or discard this patch.
system/modules/Db/objects/Mysql/Query.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -190,15 +190,15 @@  discard block
 block discarded – undo
190 190
                     $newValue = '';
191 191
                     foreach ($value as $item) {
192 192
                         if ($newValue) {
193
-                            $newValue.=',';
193
+                            $newValue .= ',';
194 194
                         }
195 195
                         if (is_string($item)) {
196
-                            $newValue .='"' . $item . '"';
196
+                            $newValue .= '"'.$item.'"';
197 197
                         } else {
198
-                            $newValue .=$item;
198
+                            $newValue .= $item;
199 199
                         }
200 200
                     }
201
-                    $value = '(' . $newValue . ')';
201
+                    $value = '('.$newValue.')';
202 202
                 } elseif (!preg_match('!\(!', $value) && !preg_match('![^0-9,\.\(\) ]!', $value))
203 203
                     $value = "({$value})";
204 204
                 elseif (preg_match('!\(!', $value) && preg_match('![^0-9,\.\(\) ]!', $value))
@@ -262,8 +262,8 @@  discard block
 block discarded – undo
262 262
 
263 263
         switch ($this->operation) {
264 264
             case 'SELECT':
265
-                $query .= ' ' . ($this->distinct ? 'DISTINCT' : '');
266
-                $query .= ' ' . (!$this->cols ? '*' : ((is_array($this->cols) ? implode(',', $this->cols) : $this->cols)));
265
+                $query .= ' '.($this->distinct ? 'DISTINCT' : '');
266
+                $query .= ' '.(!$this->cols ? '*' : ((is_array($this->cols) ? implode(',', $this->cols) : $this->cols)));
267 267
             case 'DELETE':
268 268
                 $query .= ' FROM';
269 269
                 break;
@@ -280,9 +280,9 @@  discard block
 block discarded – undo
280 280
                 $this->params = array_merge($this->params, array_values($this->cols));
281 281
                 $colsStr = '';
282 282
                 if ($this->cols) {
283
-                    $colsStr = '`' . implode('`,`', array_keys($this->cols)) . '`';
283
+                    $colsStr = '`'.implode('`,`', array_keys($this->cols)).'`';
284 284
                 }
285
-                $query .= ' (' . $colsStr . ') VALUES (' . rtrim(str_repeat('?,', count($this->cols)), ',') . ')';
285
+                $query .= ' ('.$colsStr.') VALUES ('.rtrim(str_repeat('?,', count($this->cols)), ',').')';
286 286
                 break;
287 287
             case 'CREATE TABLE':
288 288
                 $query .= " (";
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
                 }
295 295
                 $query = rtrim($query, ',');
296 296
                 if ($this->indexes) {
297
-                    $query .= ', ' . implode(',', $this->indexes);
297
+                    $query .= ', '.implode(',', $this->indexes);
298 298
                 }
299 299
                 $query .= ") ENGINE = INNODB CHARACTER SET utf8 COLLATE utf8_general_ci";
300 300
                 break;
@@ -309,23 +309,23 @@  discard block
 block discarded – undo
309 309
                     }
310 310
                 }
311 311
                 $update = implode(',', $updates);
312
-                $query .=" SET {$update}";
312
+                $query .= " SET {$update}";
313 313
             case 'SELECT':
314 314
             case 'DELETE':
315 315
                 $this->buildWhere($this->where);
316 316
                 if ($this->whereString) {
317
-                    $query .= ' ' . $this->whereString;
317
+                    $query .= ' '.$this->whereString;
318 318
                 }
319 319
                 break;
320 320
         }
321 321
         if ($this->group) {
322
-            $query .= ' GROUP BY ' . implode(',', $this->group);
322
+            $query .= ' GROUP BY '.implode(',', $this->group);
323 323
         }
324 324
         if ($this->order) {
325
-            $query .= ' ORDER BY ' . implode(',', $this->order);
325
+            $query .= ' ORDER BY '.implode(',', $this->order);
326 326
         }
327 327
         if ($this->limit) {
328
-            $query .= ' ' . $this->limit;
328
+            $query .= ' '.$this->limit;
329 329
         }
330 330
         return ['query' => $query, 'params' => $this->params];
331 331
     }
Please login to merge, or discard this patch.
system/modules/Db/Db.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,16 +23,16 @@  discard block
 block discarded – undo
23 23
         } else {
24 24
             $db = $param;
25 25
         }
26
-        $className = 'Db\\' . $db['driver'];
26
+        $className = 'Db\\'.$db['driver'];
27 27
         $this->connection = new $className();
28 28
         $this->connection->init($db);
29 29
         $this->connection->dbInstance = $this;
30 30
         $this->connect = $this->connection->connect;
31 31
         $this->dbConfig = $db;
32 32
 
33
-        $this->className = 'Db\\' . $this->dbConfig['driver'];
34
-        $this->QueryClassName = 'Db\\' . $this->dbConfig['driver'] . '\\Query';
35
-        $this->ResultClassName = 'Db\\' . $this->dbConfig['driver'] . '\\Result';
33
+        $this->className = 'Db\\'.$this->dbConfig['driver'];
34
+        $this->QueryClassName = 'Db\\'.$this->dbConfig['driver'].'\\Query';
35
+        $this->ResultClassName = 'Db\\'.$this->dbConfig['driver'].'\\Result';
36 36
     }
37 37
 
38 38
     public function __call($name, $params)
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     public function newQuery()
57 57
     {
58
-        if($this->QueryClassName) {
58
+        if ($this->QueryClassName) {
59 59
             return new $this->QueryClassName($this->connection);
60 60
         }
61 61
         return false;
Please login to merge, or discard this patch.
system/modules/Materials/models/Category.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,10 +102,10 @@
 block discarded – undo
102 102
         if ($treePath) {
103 103
             $categorys = Category::getList(['where' => ['id', implode(',', $treePath), 'IN']]);
104 104
             foreach ($categorys as $category) {
105
-                $href .="/{$category->alias}";
105
+                $href .= "/{$category->alias}";
106 106
             }
107 107
         }
108
-        return $href . "/" . ($this->alias ? $this->alias : $this->pk());
108
+        return $href."/".($this->alias ? $this->alias : $this->pk());
109 109
     }
110 110
 
111 111
     public static function relations()
Please login to merge, or discard this patch.
system/modules/Materials/appControllers/MaterialsController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
         } else {
98 98
             $this->view->setTitle($category->name);
99 99
 
100
-            $pages = new Ui\Pages($_GET, ['count' => Materials\Material::getCount(['where' => ['tree_path', $category->tree_path . $category->id . '/%', 'LIKE']]), 'limit' => 10]);
101
-            $materials = Materials\Material::getList(['where' => ['tree_path', $category->tree_path . $category->id . '/%', 'LIKE'], 'order' => ['date_create', 'desc'], 'start' => $pages->params['start'], 'limit' => $pages->params['limit']]);
100
+            $pages = new Ui\Pages($_GET, ['count' => Materials\Material::getCount(['where' => ['tree_path', $category->tree_path.$category->id.'/%', 'LIKE']]), 'limit' => 10]);
101
+            $materials = Materials\Material::getList(['where' => ['tree_path', $category->tree_path.$category->id.'/%', 'LIKE'], 'order' => ['date_create', 'desc'], 'start' => $pages->params['start'], 'limit' => $pages->params['limit']]);
102 102
 
103 103
             $this->view->page(['page' => $category->resolveTemplate(), 'content' => $category->resolveViewer(), 'data' => compact('materials', 'pages', 'category')]);
104 104
         }
@@ -132,17 +132,17 @@  discard block
 block discarded – undo
132 132
             $this->view->addMetaTag(['name' => 'description', 'content' => $material->description]);
133 133
         }
134 134
         $this->view->addMetaTag(['property' => 'og:title', 'content' => $material->name]);
135
-        $this->view->addMetaTag(['property' => 'og:url', 'content' => 'http://' . idn_to_utf8(INJI_DOMAIN_NAME) . '/' . $material->alias]);
135
+        $this->view->addMetaTag(['property' => 'og:url', 'content' => 'http://'.idn_to_utf8(INJI_DOMAIN_NAME).'/'.$material->alias]);
136 136
         if ($material->description) {
137
-            $this->view->addMetaTag(['property' => 'og:description', 'content' => 'http://' . idn_to_utf8(INJI_DOMAIN_NAME) . '/' . $material->description]);
137
+            $this->view->addMetaTag(['property' => 'og:description', 'content' => 'http://'.idn_to_utf8(INJI_DOMAIN_NAME).'/'.$material->description]);
138 138
         }
139 139
         if ($material->image) {
140
-            $this->view->addMetaTag(['property' => 'og:image', 'content' => 'http://' . idn_to_utf8(INJI_DOMAIN_NAME) . $material->image->path]);
140
+            $this->view->addMetaTag(['property' => 'og:image', 'content' => 'http://'.idn_to_utf8(INJI_DOMAIN_NAME).$material->image->path]);
141 141
         } elseif ($logo = Files\File::get('site_logo', 'code')) {
142
-            $this->view->addMetaTag(['property' => 'og:image', 'content' => 'http://' . idn_to_utf8(INJI_DOMAIN_NAME) . $logo->path]);
142
+            $this->view->addMetaTag(['property' => 'og:image', 'content' => 'http://'.idn_to_utf8(INJI_DOMAIN_NAME).$logo->path]);
143 143
         }
144 144
         $this->view->setTitle($material->name);
145
-        $bread[] = ['text' => $material->name, 'href' => '/' . $material->alias];
145
+        $bread[] = ['text' => $material->name, 'href' => '/'.$material->alias];
146 146
         $this->view->page([
147 147
             'page' => $material->resolveTemplate(),
148 148
             'content' => $material->resolveViewer(),
Please login to merge, or discard this patch.
system/modules/Materials/Materials.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
         if (!empty($conf['files']['aditionTemplateFiels'])) {
42 42
             foreach ($conf['files']['aditionTemplateFiels'] as $file) {
43
-                $return[$file['file']] = '- ' . $file['name'];
43
+                $return[$file['file']] = '- '.$file['name'];
44 44
             }
45 45
         }
46 46
         return $return;
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
         if (!empty($conf['files']['aditionTemplateFiels'])) {
78 78
             foreach ($conf['files']['aditionTemplateFiels'] as $file) {
79
-                $return[$file['file']] = '- ' . $file['name'];
79
+                $return[$file['file']] = '- '.$file['name'];
80 80
             }
81 81
         }
82 82
         return $return;
Please login to merge, or discard this patch.