@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | Illuminate\Database\Capsule\Manager::schema($connectName)->create('sessions', function($table) { |
4 | - $table->string('sess_id', 128)->index()->primary() ; |
|
4 | + $table->string('sess_id', 128)->index()->primary(); |
|
5 | 5 | $table->binary('sess_data'); |
6 | 6 | $table->string('sess_lifetime', 16); // shutout to laravel, if i make it like "integer" it automaticlly add "primary" key for it, hate this!!! |
7 | 7 | $table->string('sess_time', 16); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | foreach (App::$Translate->getAvailableLangs() as $lang) { |
27 | 27 | $items[] = [ |
28 | 28 | 'type' => 'text', |
29 | - 'text' => '<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="flag flag-'.$lang.'" />', |
|
29 | + 'text' => '<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="flag flag-' . $lang . '" />', |
|
30 | 30 | 'html' => true, |
31 | 31 | '!secure' => true |
32 | 32 | ]; |
@@ -29,7 +29,7 @@ |
||
29 | 29 | $route = $app->sys_name . '/index'; |
30 | 30 | $icoStatus = null; |
31 | 31 | $actions = \App::$View->render('macro/app_actions', ['controller' => $app->sys_name]); |
32 | - if ((int)$app->disabled !== 0) { |
|
32 | + if ((int) $app->disabled !== 0) { |
|
33 | 33 | $icoStatus = ' <i class="fa fa-pause" style="color: #ff0000;"></i>'; |
34 | 34 | } elseif ($app->checkVersion() !== true) { |
35 | 35 | $icoStatus = ' <i class="fa fa-exclamation" style="color: #ffbd26;"></i>'; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | public function before() |
40 | 40 | { |
41 | 41 | foreach ($this->_apps as $app) { |
42 | - $this->_definedControllers[] = (string)$app->sys_name; |
|
42 | + $this->_definedControllers[] = (string) $app->sys_name; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | parent::before(); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | } |
78 | 78 | |
79 | 79 | // get ext version |
80 | - $cVersion = (float)constant($cPath . '::VERSION'); |
|
80 | + $cVersion = (float) constant($cPath . '::VERSION'); |
|
81 | 81 | if ($cVersion < 0.1) { |
82 | 82 | $cVersion = 0.1; |
83 | 83 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $search = \Apps\ActiveRecord\App::getItem('app', $controller); |
72 | 72 | |
73 | 73 | // check what we got |
74 | - if ($search === null || (int)$search->id < 1) { |
|
74 | + if ($search === null || (int) $search->id < 1) { |
|
75 | 75 | throw new ForbiddenException('App is not founded'); |
76 | 76 | } |
77 | 77 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | $search = \Apps\ActiveRecord\App::where('sys_name', '=', $controllerName)->where('type', '=', 'app')->first(); |
98 | 98 | |
99 | - if ($search === null || (int)$search->id < 1) { |
|
99 | + if ($search === null || (int) $search->id < 1) { |
|
100 | 100 | throw new ForbiddenException('App is not founded'); |
101 | 101 | } |
102 | 102 |
@@ -159,7 +159,7 @@ |
||
159 | 159 | if ($item->type === 'app') { |
160 | 160 | $appControllers[] = $item->sys_name; |
161 | 161 | $appMenuItems[] = $menuItem; |
162 | - } elseif($item->type === 'widget') { |
|
162 | + } elseif ($item->type === 'widget') { |
|
163 | 163 | $widgetControllers[] = $item->sys_name; |
164 | 164 | $widgetMenuItems[] = $menuItem; |
165 | 165 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | $route = $widget->sys_name . '/index'; |
27 | 27 | $icoStatus = null; |
28 | 28 | $actions = $this->render('macro/widget_actions', ['controller' => $widget->sys_name]); |
29 | - if ((int)$widget->disabled !== 0) { |
|
29 | + if ((int) $widget->disabled !== 0) { |
|
30 | 30 | $icoStatus = ' <i class="fa fa-pause" style="color: #ff0000;"></i>'; |
31 | 31 | } elseif ($widget->checkVersion() !== true) { |
32 | 32 | $icoStatus = ' <i class="fa fa-exclamation" style="color: #ffbd26;"></i>'; |
@@ -12,7 +12,7 @@ |
||
12 | 12 | { |
13 | 13 | $status = $object->disabled; |
14 | 14 | |
15 | - $object->disabled = (int)!$status; // magic inside: bool to int and reverse - 0 => 1, 1 => 0 |
|
15 | + $object->disabled = (int) !$status; // magic inside: bool to int and reverse - 0 => 1, 1 => 0 |
|
16 | 16 | $object->save(); |
17 | 17 | } |
18 | 18 | } |
19 | 19 | \ No newline at end of file |
@@ -31,7 +31,7 @@ |
||
31 | 31 | [['text' => __('Name')], ['text' => $widget->getLocaleName()]], |
32 | 32 | [['text' => __('System name')], ['text' => $widget->sys_name]], |
33 | 33 | [['text' => __('Last update')], ['text' => Date::convertToDatetime($widget->updated_at, DATE::FORMAT_TO_SECONDS)]], |
34 | - [['text' => __('Status')], ['text' => ((int)$widget->disabled === 0) ? 'On' : 'Off'], 'property' => ['class' => ((int)$widget->disabled === 0) ? 'alert-success' : 'alert-danger']] |
|
34 | + [['text' => __('Status')], ['text' => ((int) $widget->disabled === 0) ? 'On' : 'Off'], 'property' => ['class' => ((int) $widget->disabled === 0) ? 'alert-success' : 'alert-danger']] |
|
35 | 35 | ] |
36 | 36 | ] |
37 | 37 | ]); ?> |