@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | $user = Users\User::$cur; |
18 | 18 | if (!empty($_POST) && !empty($_POST['card_id'])) { |
19 | 19 | $error = false; |
20 | - $card = \Ecommerce\Card::get((int)$_POST['card_id']); |
|
20 | + $card = \Ecommerce\Card::get((int) $_POST['card_id']); |
|
21 | 21 | if (!$card) { |
22 | 22 | $error = true; |
23 | 23 | Msg::add('Такой карты не существует', 'danger'); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | //search |
104 | 104 | if (!empty($_GET['search'])) { |
105 | 105 | if (!empty($_GET['inCatalog'])) { |
106 | - $category_id = (int)$_GET['inCatalog']; |
|
106 | + $category_id = (int) $_GET['inCatalog']; |
|
107 | 107 | } |
108 | 108 | $search = $_GET['search']; |
109 | 109 | } else { |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | } |
210 | 210 | |
211 | 211 | public function viewAction($id = '', $quick = 0) { |
212 | - $item = \Ecommerce\Item::get((int)$id); |
|
212 | + $item = \Ecommerce\Item::get((int) $id); |
|
213 | 213 | if (!$item) { |
214 | 214 | Tools::redirect('/ecommerce/', 'Такой товар не найден'); |
215 | 215 | } |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | $bread[] = ['text' => $item->name()]; |
229 | 229 | $this->view->setTitle($item->name()); |
230 | 230 | $options = [ |
231 | - 'data' => compact('item', 'active', 'catalog', 'bread','quick'), |
|
231 | + 'data' => compact('item', 'active', 'catalog', 'bread', 'quick'), |
|
232 | 232 | 'content' => $item->view ? $item->view : 'view', |
233 | 233 | ]; |
234 | 234 | if (isset($_GET['quickview'])) { |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | return [ |
4 | 4 | 'name' => 'Онлайн оплата', |
5 | - 'handler' => function($cart) { |
|
5 | + 'handler' => function ($cart) { |
|
6 | 6 | if (\App::$cur->money) { |
7 | 7 | $sums = $cart->finalSum(); |
8 | 8 | foreach ($sums->sums as $currency_id => $sum) { |
@@ -4,7 +4,7 @@ |
||
4 | 4 | $category = []; |
5 | 5 | } |
6 | 6 | $tree = new Ui\Tree(); |
7 | - $tree->ul('\Ecommerce\Category', 0, function($categoryItem) use($category) { |
|
7 | + $tree->ul('\Ecommerce\Category', 0, function ($categoryItem) use($category) { |
|
8 | 8 | if ($category && $category->id == $categoryItem->id) { |
9 | 9 | $class = 'active'; |
10 | 10 | } else { |
@@ -10,7 +10,7 @@ |
||
10 | 10 | */ |
11 | 11 | return [ |
12 | 12 | 'classes' => ['Ui\ActiveForm'], |
13 | - 'get' => function($element) { |
|
13 | + 'get' => function ($element) { |
|
14 | 14 | $access = null; |
15 | 15 | $path = [ |
16 | 16 | 'models', |
@@ -10,7 +10,7 @@ |
||
10 | 10 | */ |
11 | 11 | return [ |
12 | 12 | 'classes' => ['Ui\DataManager'], |
13 | - 'get' => function($element) { |
|
13 | + 'get' => function ($element) { |
|
14 | 14 | $access = null; |
15 | 15 | $path = [ |
16 | 16 | 'models', |
@@ -62,7 +62,7 @@ |
||
62 | 62 | public static function ul($objectRoot, $maxDeep = 0, $hrefFunc = null, $order = [], $activeFunc = '', $activeClass = 'active') { |
63 | 63 | $count = 0; |
64 | 64 | if (!$hrefFunc) { |
65 | - $hrefFunc = function($object) { |
|
65 | + $hrefFunc = function ($object) { |
|
66 | 66 | return "<a href='#'> {$object->name()}</a>"; |
67 | 67 | }; |
68 | 68 | } |
@@ -716,7 +716,7 @@ |
||
716 | 716 | return []; |
717 | 717 | } |
718 | 718 | $tree = new Tree(); |
719 | - $tree->ul($this->managerOptions['categorys']['model'], 0, function($category) { |
|
719 | + $tree->ul($this->managerOptions['categorys']['model'], 0, function ($category) { |
|
720 | 720 | $path = $category->tree_path . ($category->pk() ? $category->pk() . "/" : ''); |
721 | 721 | $cleanClassName = str_replace('\\', '\\\\', get_class($category)); |
722 | 722 | return "<a href='#' onclick='inji.Ui.dataManagers.get(this).switchCategory(this);return false;' data-index='{$category->index()}' data-path ='{$path}' data-id='{$category->pk()}' data-model='{$this->managerOptions['categorys']['model']}'> {$category->name}</a> |
@@ -8,7 +8,7 @@ |
||
8 | 8 | * @covers Inji::unlisten |
9 | 9 | */ |
10 | 10 | public function testNotSavingEvent() { |
11 | - \Inji::$inst->listen('testEvent', 'testCallback', function() { |
|
11 | + \Inji::$inst->listen('testEvent', 'testCallback', function () { |
|
12 | 12 | return true; |
13 | 13 | }); |
14 | 14 | $this->assertEquals(true, Inji::$inst->event('testEvent')); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | define('INJI_DOMAIN_NAME', 'test.app'); |
17 | 17 | |
18 | -spl_autoload_register(function($class_name) { |
|
18 | +spl_autoload_register(function ($class_name) { |
|
19 | 19 | if (file_exists(INJI_SYSTEM_DIR . '/Inji/' . $class_name . '.php')) { |
20 | 20 | include_once INJI_SYSTEM_DIR . '/Inji/' . $class_name . '.php'; |
21 | 21 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | //load core |
25 | 25 | Inji::$inst = new Inji(); |
26 | 26 | Inji::$config = Config::system(); |
27 | -Inji::$inst->listen('Config-change-system', 'systemConfig', function($event) { |
|
27 | +Inji::$inst->listen('Config-change-system', 'systemConfig', function ($event) { |
|
28 | 28 | Inji::$config = $event['eventObject']; |
29 | 29 | return $event['eventObject']; |
30 | 30 | }); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | App::$cur->params = []; |
46 | 46 | App::$cur->config = Config::app(App::$cur); |
47 | 47 | App::$primary = App::$cur; |
48 | -Inji::$inst->listen('Config-change-app-' . App::$cur->name, 'curAppConfig', function($event) { |
|
48 | +Inji::$inst->listen('Config-change-app-' . App::$cur->name, 'curAppConfig', function ($event) { |
|
49 | 49 | App::$cur->config = $event['eventObject']; |
50 | 50 | return $event['eventObject']; |
51 | 51 | }); |