@@ -310,7 +310,7 @@ |
||
310 | 310 | if (!$item) { |
311 | 311 | Tools::redirect('/ecommerce/', 'Такой товар не найден'); |
312 | 312 | } |
313 | - if(!$item->isVisible()){ |
|
313 | + if (!$item->isVisible()) { |
|
314 | 314 | Tools::redirect('/ecommerce/', 'Этот товар сейчас недоступен'); |
315 | 315 | } |
316 | 316 | $active = $item->category_id; |
@@ -310,7 +310,7 @@ |
||
310 | 310 | if (!$item) { |
311 | 311 | Tools::redirect('/ecommerce/', 'Такой товар не найден'); |
312 | 312 | } |
313 | - if(!$item->isVisible()){ |
|
313 | + if(!$item->isVisible()) { |
|
314 | 314 | Tools::redirect('/ecommerce/', 'Этот товар сейчас недоступен'); |
315 | 315 | } |
316 | 316 | $active = $item->category_id; |
@@ -106,7 +106,7 @@ |
||
106 | 106 | } |
107 | 107 | return false; |
108 | 108 | } |
109 | - public function possibleModuleClasses($moduleName){ |
|
109 | + public function possibleModuleClasses($moduleName) { |
|
110 | 110 | $possibleModules = []; |
111 | 111 | if ($this->namespace) { |
112 | 112 | $possibleModules[] = $this->namespace . '\\' . $moduleName; |
@@ -106,7 +106,7 @@ |
||
106 | 106 | } |
107 | 107 | return false; |
108 | 108 | } |
109 | - public function possibleModuleClasses($moduleName){ |
|
109 | + public function possibleModuleClasses($moduleName) { |
|
110 | 110 | $possibleModules = []; |
111 | 111 | if ($this->namespace) { |
112 | 112 | $possibleModules[] = $this->namespace . '\\' . $moduleName; |
@@ -13,8 +13,9 @@ |
||
13 | 13 | |
14 | 14 | public static function genArray($data, $level = 0) { |
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 | 21 | if (!is_array($item)) { |
@@ -61,7 +61,7 @@ |
||
61 | 61 | return $this->connection->updateItems($tableName, $this->whereArray, $values, $this->dbOptions); |
62 | 62 | } |
63 | 63 | |
64 | - public function delete(string $tableName='') { |
|
64 | + public function delete(string $tableName = '') { |
|
65 | 65 | if (!$tableName) { |
66 | 66 | $tableName = $this->table; |
67 | 67 | } |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | return true; |
249 | 249 | } |
250 | 250 | |
251 | - public static function getOptionsList($inputParams, $params = [], $modelName = '', $aditionalInputNamePrefix = 'aditional', $options = [],$model=false) { |
|
251 | + public static function getOptionsList($inputParams, $params = [], $modelName = '', $aditionalInputNamePrefix = 'aditional', $options = [], $model = false) { |
|
252 | 252 | $values = []; |
253 | 253 | switch ($inputParams['source']) { |
254 | 254 | case 'model': |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | break; |
260 | 260 | case 'method': |
261 | 261 | if (!empty($inputParams['params'])) { |
262 | - $values = call_user_func_array([\App::$cur->{$inputParams['module']}, $inputParams['method']], $inputParams['params']+[$model]); |
|
262 | + $values = call_user_func_array([\App::$cur->{$inputParams['module']}, $inputParams['method']], $inputParams['params'] + [$model]); |
|
263 | 263 | } else { |
264 | 264 | $values = \App::$cur->{$inputParams['module']}->{$inputParams['method']}($model); |
265 | 265 | } |