@@ -18,7 +18,7 @@ |
||
18 | 18 | if ($type == 'array') { |
19 | 19 | return !is_array($_GET[$key]) ? [] : $_GET[$key]; |
20 | 20 | } |
21 | - return eval('return (' . $type . ') $_GET[$key];'); |
|
21 | + return eval('return ('.$type.') $_GET[$key];'); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | $month = array('января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'); |
39 | 39 | $yearPosrfix = isset($options['yearPostfix']) ? $options['yearPostfix'] : " г."; |
40 | - return ($dd > 0 ? $dd . " " : '') . $month[$mm - 1] . " " . $yy . $yearPosrfix . (empty($options['notime']) ? " " . $hours : ''); |
|
40 | + return ($dd > 0 ? $dd." " : '').$month[$mm - 1]." ".$yy.$yearPosrfix.(empty($options['notime']) ? " ".$hours : ''); |
|
41 | 41 | case 'select': |
42 | 42 | switch ($colInfo['colParams']['source']) { |
43 | 43 | case 'model': |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | case 'image': |
65 | 65 | $file = Files\File::get($this->model->{$this->valueKey}); |
66 | 66 | if ($file) { |
67 | - return '<img src="' . $file->path . '?resize=60x120" />'; |
|
67 | + return '<img src="'.$file->path.'?resize=60x120" />'; |
|
68 | 68 | } else { |
69 | 69 | return '<img src="/static/system/images/no-image.png?resize=60x120" />'; |
70 | 70 | } |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | { |
21 | 21 | if (!$model) { |
22 | 22 | $modulePath = Module::getModulePath($this->module->moduleName); |
23 | - $path = $modulePath . '/models'; |
|
23 | + $path = $modulePath.'/models'; |
|
24 | 24 | if (file_exists($path)) { |
25 | 25 | $files = array_slice(scandir($path), 2); |
26 | 26 | foreach ($files as $file) { |
27 | - if (is_dir($path . '/' . $file)) { |
|
27 | + if (is_dir($path.'/'.$file)) { |
|
28 | 28 | continue; |
29 | 29 | } |
30 | 30 | $model = pathinfo($file, PATHINFO_FILENAME); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | } |
33 | 33 | } |
34 | 34 | } |
35 | - $fullModelName = $this->module->moduleName . '\\' . ucfirst($model); |
|
35 | + $fullModelName = $this->module->moduleName.'\\'.ucfirst($model); |
|
36 | 36 | $dataManager = new Ui\DataManager($fullModelName, $dataManager); |
37 | 37 | $title = !empty($dataManager->managerOptions['name']) ? $dataManager->managerOptions['name'] : $fullModelName::objectName(); |
38 | 38 | $this->view->setTitle($title); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | public function viewAction($model, $pk) |
43 | 43 | { |
44 | - $fullModelName = $this->module->moduleName . '\\' . ucfirst($model); |
|
44 | + $fullModelName = $this->module->moduleName.'\\'.ucfirst($model); |
|
45 | 45 | $item = $fullModelName::get($pk); |
46 | 46 | $this->view->setTitle($item->name()); |
47 | 47 | if (!empty($_POST['comment'])) { |
@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | // time start |
17 | 17 | define('INJI_TIME_START', microtime(true)); |
18 | 18 | // system files dir |
19 | -define('INJI_SYSTEM_DIR', __DIR__ . '/system'); |
|
19 | +define('INJI_SYSTEM_DIR', __DIR__.'/system'); |
|
20 | 20 | // apps files dir |
21 | -define('INJI_PROGRAM_DIR', __DIR__ . '/program'); |
|
21 | +define('INJI_PROGRAM_DIR', __DIR__.'/program'); |
|
22 | 22 | |
23 | 23 | // check base config |
24 | 24 | if (!file_exists(INJI_SYSTEM_DIR) || !is_dir(INJI_SYSTEM_DIR)) { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | } |
36 | 36 | } |
37 | 37 | |
38 | -require_once( INJI_SYSTEM_DIR . '/init.php' ); |
|
38 | +require_once(INJI_SYSTEM_DIR.'/init.php'); |
|
39 | 39 | /** |
40 | 40 | * System error messages |
41 | 41 | */ |
@@ -89,16 +89,16 @@ |
||
89 | 89 | |
90 | 90 | public function name() |
91 | 91 | { |
92 | - if ($this->first_name . $this->last_name . $this->middle_name) { |
|
92 | + if ($this->first_name.$this->last_name.$this->middle_name) { |
|
93 | 93 | $name = ''; |
94 | 94 | if ($this->first_name) { |
95 | - $name.=$this->first_name; |
|
95 | + $name .= $this->first_name; |
|
96 | 96 | } |
97 | 97 | if ($this->middle_name) { |
98 | - $name.=($name ? ' ' : '') . $this->middle_name; |
|
98 | + $name .= ($name ? ' ' : '').$this->middle_name; |
|
99 | 99 | } |
100 | 100 | if ($this->last_name) { |
101 | - $name.=($name ? ' ' : '') . $this->last_name; |
|
101 | + $name .= ($name ? ' ' : '').$this->last_name; |
|
102 | 102 | } |
103 | 103 | return $name; |
104 | 104 | } else { |
@@ -1,7 +1,7 @@ |
||
1 | 1 | |
2 | 2 | <?php |
3 | 3 | echo empty($options['noContainer']) ? '<div class="form-group">' : ''; |
4 | -echo $label !== false ? "<label>{$label}" . (!empty($options['required']) ? ' <span class="required-star">*</span>' : '') . "</label>" : ''; |
|
4 | +echo $label !== false ? "<label>{$label}".(!empty($options['required']) ? ' <span class="required-star">*</span>' : '')."</label>" : ''; |
|
5 | 5 | ?> |
6 | 6 | <div class="row"> |
7 | 7 | <div class="col-xs-6"> |
@@ -102,10 +102,10 @@ |
||
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() |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $table->addRow([ |
39 | 39 | $history->id, |
40 | 40 | $history->wallet->currency->name(), |
41 | - '<span class = "' . ($amount > 0 ? "text-success" : 'text-danger') . '">' . $amount . '</span>', |
|
41 | + '<span class = "'.($amount > 0 ? "text-success" : 'text-danger').'">'.$amount.'</span>', |
|
42 | 42 | $history->comment, |
43 | 43 | $history->date_create |
44 | 44 | ]); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | foreach ($fields as $field) { |
44 | 44 | if (empty($_POST['userAdds']['fields'][$field->id]) && $field->required) { |
45 | 45 | $error = 1; |
46 | - Msg::add('Вы не указали: ' . $field->name); |
|
46 | + Msg::add('Вы не указали: '.$field->name); |
|
47 | 47 | } |
48 | 48 | } |
49 | 49 | if (!$error) { |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $extra->price = $card->price; |
72 | 72 | $extra->count = 1; |
73 | 73 | $extra->cart_id = $cart->id; |
74 | - $extra->info = 'card:' . $card->id . '|cardItem:' . $cardItem->id; |
|
74 | + $extra->info = 'card:'.$card->id.'|cardItem:'.$cardItem->id; |
|
75 | 75 | $extra->save(); |
76 | 76 | Tools::redirect('/ecommerce/cart/success'); |
77 | 77 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $items = $this->ecommerce->getItems(); |
87 | 87 | $return = []; |
88 | 88 | foreach ($items as $item) { |
89 | - $return[] = ['name' => $item->name(), 'search' => $item->search_index . ' ' . $item->name]; |
|
89 | + $return[] = ['name' => $item->name(), 'search' => $item->search_index.' '.$item->name]; |
|
90 | 90 | } |
91 | 91 | $return = json_encode($return); |
92 | 92 | Cache::set('itemsAutocomplete', [], $return); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | $categoryIds = array_values(array_filter(explode('/', $category->tree_path))); |
163 | 163 | foreach ($categoryIds as $id) { |
164 | 164 | $cat = Ecommerce\Category::get($id); |
165 | - $bread[] = array('text' => $cat->name, 'href' => '/ecommerce/itemList/' . $cat->id); |
|
165 | + $bread[] = array('text' => $cat->name, 'href' => '/ecommerce/itemList/'.$cat->id); |
|
166 | 166 | } |
167 | 167 | $this->view->setTitle($category->name); |
168 | 168 | } |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | foreach ($catalogIds as $id) { |
227 | 227 | $cat = Ecommerce\Category::get($id); |
228 | 228 | if ($cat) { |
229 | - $bread[] = ['text' => $cat->name, 'href' => '/ecommerce/itemList/' . $cat->id]; |
|
229 | + $bread[] = ['text' => $cat->name, 'href' => '/ecommerce/itemList/'.$cat->id]; |
|
230 | 230 | } |
231 | 231 | } |
232 | 232 | $bread[] = ['text' => $item->name()]; |
@@ -241,9 +241,9 @@ discard block |
||
241 | 241 | $this->view->addMetaTag(['property' => 'og:title', 'content' => $item->name]); |
242 | 242 | $this->view->addMetaTag(['property' => 'og:description', 'content' => $item->description]); |
243 | 243 | if ($item->image) { |
244 | - $this->view->addMetaTag(['property' => 'og:image', 'content' => 'http://' . INJI_DOMAIN_NAME . $item->image->path]); |
|
244 | + $this->view->addMetaTag(['property' => 'og:image', 'content' => 'http://'.INJI_DOMAIN_NAME.$item->image->path]); |
|
245 | 245 | } |
246 | - $this->view->addMetaTag(['property' => 'og:url', 'content' => 'http://' . INJI_DOMAIN_NAME . '/view/' . $item->id]); |
|
246 | + $this->view->addMetaTag(['property' => 'og:url', 'content' => 'http://'.INJI_DOMAIN_NAME.'/view/'.$item->id]); |
|
247 | 247 | |
248 | 248 | $options['content'] = $item->view ? $item->view : 'view'; |
249 | 249 | $this->view->page($options); |