@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public static function create($config) |
14 | 14 | { |
15 | - if(!array_key_exists('driver', $config)) { |
|
15 | + if (!array_key_exists('driver', $config)) { |
|
16 | 16 | throw new InvalidArgumentException('You must specify a driver'); |
17 | 17 | } |
18 | 18 |
@@ -43,8 +43,8 @@ |
||
43 | 43 | |
44 | 44 | <div id="toolbar"> |
45 | 45 | <ul> |
46 | - <?php foreach($collectors as $collector): $tab = $collector->tab(); ?> |
|
47 | - <li class="<?php echo (array_key_exists('class', $tab) ? $tab['class'] : '')?>"><?=$tab['title'];?></li> |
|
46 | + <?php foreach ($collectors as $collector): $tab = $collector->tab(); ?> |
|
47 | + <li class="<?php echo (array_key_exists('class', $tab) ? $tab['class'] : '')?>"><?=$tab['title']; ?></li> |
|
48 | 48 | <?php endforeach; ?> |
49 | 49 | <li class="fyuze">Fyuze 0.1</li> |
50 | 50 | </ul> |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | set_error_handler($this->setErrorHandler()); |
23 | 23 | set_exception_handler($this->setExceptionHandler()); |
24 | 24 | |
25 | - $this->register('Exception', function (Exception $exception) { |
|
25 | + $this->register('Exception', function(Exception $exception) { |
|
26 | 26 | $handler = new ExceptionHandler($exception); |
27 | 27 | $handler->display(); |
28 | 28 | }); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | { |
50 | 50 | try { |
51 | 51 | |
52 | - $handlers = array_filter($this->handlers, function ($handler) use ($exception) { |
|
52 | + $handlers = array_filter($this->handlers, function($handler) use ($exception) { |
|
53 | 53 | return $exception instanceof $handler[0]; |
54 | 54 | }); |
55 | 55 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | protected function setExceptionHandler() |
74 | 74 | { |
75 | - return function ($exception) { |
|
75 | + return function($exception) { |
|
76 | 76 | $this->handle($exception); |
77 | 77 | }; |
78 | 78 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | */ |
84 | 84 | protected function setErrorHandler() |
85 | 85 | { |
86 | - return function ($severity, $message, $file, $line) { |
|
86 | + return function($severity, $message, $file, $line) { |
|
87 | 87 | if (error_reporting() && $severity) { |
88 | 88 | throw new ErrorException($message, 0, $severity, $file, $line); |
89 | 89 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | protected function handleFatalError() |
100 | 100 | { |
101 | - return function () { |
|
101 | + return function() { |
|
102 | 102 | $error = error_get_last(); |
103 | 103 | |
104 | 104 | if ($error['type'] === E_ERROR) { |
@@ -94,7 +94,7 @@ |
||
94 | 94 | */ |
95 | 95 | protected function getParams() |
96 | 96 | { |
97 | - return function (ReflectionParameter $param) { |
|
97 | + return function(ReflectionParameter $param) { |
|
98 | 98 | return $param->getClass(); |
99 | 99 | }; |
100 | 100 | } |
@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | $kernel = new Kernel($this->getContainer(), new Router($routes)); |
21 | 21 | |
22 | - $this->container->add('request', function () { |
|
22 | + $this->container->add('request', function() { |
|
23 | 23 | return Request::create(); |
24 | 24 | }); |
25 | 25 |
@@ -130,13 +130,13 @@ discard block |
||
130 | 130 | $container->add('app', $this); |
131 | 131 | $container->add('registry', $container); |
132 | 132 | |
133 | - $container->add('config', function () { |
|
133 | + $container->add('config', function() { |
|
134 | 134 | return new Config($this->getConfigPath(), 'prod'); |
135 | 135 | }); |
136 | 136 | |
137 | 137 | $this->config = $container->make('config'); |
138 | 138 | |
139 | - $container->add('routes', function () { |
|
139 | + $container->add('routes', function() { |
|
140 | 140 | return new Collection(); |
141 | 141 | }); |
142 | 142 | |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | */ |
166 | 166 | protected function registerServices() |
167 | 167 | { |
168 | - $services = array_filter($this->config->get('app.services'), function ($service) { |
|
168 | + $services = array_filter($this->config->get('app.services'), function($service) { |
|
169 | 169 | return class_exists($service); |
170 | 170 | }); |
171 | 171 |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | protected function locate($key, $member) |
126 | 126 | { |
127 | - $aliases = array_filter($this->members, function (&$n) use ($member) { |
|
127 | + $aliases = array_filter($this->members, function(&$n) use ($member) { |
|
128 | 128 | if ($n instanceof Closure) { |
129 | 129 | return $n($this) instanceof $member; |
130 | 130 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | */ |
148 | 148 | protected function getParams() |
149 | 149 | { |
150 | - return function (ReflectionParameter $param) { |
|
150 | + return function(ReflectionParameter $param) { |
|
151 | 151 | return $param->getClass(); |
152 | 152 | }; |
153 | 153 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function services() |
14 | 14 | { |
15 | - $this->registry->add('db', function () { |
|
15 | + $this->registry->add('db', function() { |
|
16 | 16 | |
17 | 17 | $config = $this->registry->make('config')->get('database'); |
18 | 18 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function services() |
26 | 26 | { |
27 | - $this->registry->add('toolbar', function ($app) { |
|
27 | + $this->registry->add('toolbar', function($app) { |
|
28 | 28 | |
29 | 29 | $toolbar = new Toolbar(); |
30 | 30 | $collectors = []; |