@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | class App |
14 | 14 | { |
15 | 15 | /** @var \Ffcms\Core\Properties */ |
16 | - public static $Properties; |
|
16 | + public static $Properties; |
|
17 | 17 | /** @var \Ffcms\Console\Transfer\Input */ |
18 | 18 | public static $Input; |
19 | 19 | /** @var \Ffcms\Console\Transfer\Output */ |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | /** |
25 | 25 | * Build console entry point |
26 | 26 | */ |
27 | - public static function build() |
|
28 | - { |
|
29 | - self::$Properties = new Properties(); |
|
27 | + public static function build() |
|
28 | + { |
|
29 | + self::$Properties = new Properties(); |
|
30 | 30 | self::$Input = new Input(); |
31 | 31 | self::$Output = new Output(); |
32 | 32 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | // Setup the Eloquent ORM... (optional; unless you've used setEventDispatcher()) |
42 | 42 | self::$Database->bootEloquent(); |
43 | 43 | } |
44 | - } |
|
44 | + } |
|
45 | 45 | |
46 | 46 | /** |
47 | 47 | * Build console controllers. |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $arrInput = explode('/', $controller_action); |
59 | 59 | $controller = ucfirst(strtolower($arrInput[0])); |
60 | 60 | $action = ucfirst(strtolower($arrInput[1])); |
61 | - if($action == null) { |
|
61 | + if ($action == null) { |
|
62 | 62 | $action = 'Index'; |
63 | 63 | } |
64 | 64 | // set action and id |
@@ -70,13 +70,13 @@ discard block |
||
70 | 70 | |
71 | 71 | try { |
72 | 72 | $controller_path = '/Apps/Controller/' . env_name . '/' . $controller . '.php'; |
73 | - if(file_exists(root . $controller_path) && is_readable(root . $controller_path)) { |
|
73 | + if (file_exists(root . $controller_path) && is_readable(root . $controller_path)) { |
|
74 | 74 | include_once(root . $controller_path); |
75 | 75 | $cname = 'Apps\\Controller\\' . env_name . '\\' . $controller; |
76 | - if(class_exists($cname)) { |
|
76 | + if (class_exists($cname)) { |
|
77 | 77 | $load = new $cname; |
78 | - if(method_exists($cname, $action)) { |
|
79 | - if($id !== null) { |
|
78 | + if (method_exists($cname, $action)) { |
|
79 | + if ($id !== null) { |
|
80 | 80 | $output = @$load->$action($id); |
81 | 81 | } else { |
82 | 82 | $output = @$load->$action(); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | } else { |
92 | 92 | throw new NativeException('Controller not founded: {root}' . $controller_path); |
93 | 93 | } |
94 | - } catch(NativeException $e) { |
|
94 | + } catch (NativeException $e) { |
|
95 | 95 | $e->display($e->getMessage()); |
96 | 96 | } |
97 | 97 | } |