@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | $path = trim(implode('/', $args)); |
18 | 18 | |
19 | 19 | if (is_numeric($path)) { |
20 | - $material = Materials\Material::get([['id', (int)$path], ['date_publish', null, 'IS NOT']]); |
|
20 | + $material = Materials\Material::get([['id', (int) $path], ['date_publish', null, 'IS NOT']]); |
|
21 | 21 | } |
22 | 22 | if (!$material && $args) { |
23 | 23 | foreach ($args as $key => $alias) { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | if ($category) { |
43 | 43 | $where = [ |
44 | 44 | ['category_id', $category->id], |
45 | - ['id', (int)$args[count($args) - 1]], |
|
45 | + ['id', (int) $args[count($args) - 1]], |
|
46 | 46 | ['date_publish', null, 'IS NOT'] |
47 | 47 | ]; |
48 | 48 | } else { |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $path = trim(implode('/', $args)); |
76 | 76 | $category = null; |
77 | 77 | if (is_numeric($path)) { |
78 | - $category = Materials\Category::get((int)$path); |
|
78 | + $category = Materials\Category::get((int) $path); |
|
79 | 79 | } |
80 | 80 | if (!$category) { |
81 | 81 | foreach ($args as $alias) { |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $material = false; |
111 | 111 | if ($alias) { |
112 | 112 | if (is_numeric($alias)) { |
113 | - $material = Materials\Material::get([['id', (int)$alias], ['date_publish', null, 'IS NOT']]); |
|
113 | + $material = Materials\Material::get([['id', (int) $alias], ['date_publish', null, 'IS NOT']]); |
|
114 | 114 | } |
115 | 115 | if (!$material) { |
116 | 116 | $material = Materials\Material::get([['alias', $alias], ['date_publish', null, 'IS NOT']]); |
@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | $favs = !empty($_COOKIE['ecommerce_favitems']) ? json_decode($_COOKIE['ecommerce_favitems'], true) : []; |
17 | 17 | if ($favs) { |
18 | 18 | foreach ($favs as $itemId) { |
19 | - $fav = \Ecommerce\Favorite::get([['user_id', Users\User::$cur->id], ['item_id', (int)$itemId]]); |
|
19 | + $fav = \Ecommerce\Favorite::get([['user_id', Users\User::$cur->id], ['item_id', (int) $itemId]]); |
|
20 | 20 | if (!$fav) { |
21 | - $item = \Ecommerce\Item::get((int)$itemId); |
|
21 | + $item = \Ecommerce\Item::get((int) $itemId); |
|
22 | 22 | if ($item) { |
23 | 23 | $fav = new \Ecommerce\Favorite([ |
24 | 24 | 'user_id' => Users\User::$cur->id, |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | public function getCurCart($create = true) { |
181 | 181 | $cart = false; |
182 | 182 | if (!empty($_SESSION['cart']['cart_id'])) { |
183 | - $cart = Ecommerce\Cart::get((int)$_SESSION['cart']['cart_id']); |
|
183 | + $cart = Ecommerce\Cart::get((int) $_SESSION['cart']['cart_id']); |
|
184 | 184 | } |
185 | 185 | if (!$cart && $create) { |
186 | 186 | $cart = new Ecommerce\Cart(); |
@@ -71,8 +71,8 @@ |
||
71 | 71 | $where[] = ['data', $_GET['data']]; |
72 | 72 | } |
73 | 73 | $pays = Money\Pay::getList(['where' => $where, 'order' => ['date_create', 'DESC']]); |
74 | - if(count($pays)===1){ |
|
75 | - Tools::redirect('/money/merchants/pay/'.current($pays)->id); |
|
74 | + if (count($pays) === 1) { |
|
75 | + Tools::redirect('/money/merchants/pay/' . current($pays)->id); |
|
76 | 76 | } |
77 | 77 | $this->view->page(['content' => 'pays', 'data' => compact('bread', 'pays')]); |
78 | 78 | } else { |
@@ -57,7 +57,7 @@ |
||
57 | 57 | self::warehouse($selectOptions); |
58 | 58 | |
59 | 59 | $selectOptions['group'] = Item::index(); |
60 | - if(isset($options['array'])){ |
|
60 | + if (isset($options['array'])) { |
|
61 | 61 | $selectOptions['array'] = $options['array']; |
62 | 62 | } |
63 | 63 |