@@ -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> |
@@ -20,8 +20,7 @@ |
||
20 | 20 | if ($first === true) { |
21 | 21 | |
22 | 22 | array_unshift($this->collectors, $collector); |
23 | - } |
|
24 | - else { |
|
23 | + } else { |
|
25 | 24 | |
26 | 25 | $this->collectors[] = $collector; |
27 | 26 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | */ |
35 | 35 | public function render() |
36 | 36 | { |
37 | - return new View(__DIR__ . '/Resources/views/toolbar.php', [ |
|
37 | + return new View(__DIR__.'/Resources/views/toolbar.php', [ |
|
38 | 38 | 'collectors' => $this->collectors |
39 | 39 | ]); |
40 | 40 | } |
@@ -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 |
@@ -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 = []; |
@@ -11,7 +11,7 @@ |
||
11 | 11 | */ |
12 | 12 | public function services() |
13 | 13 | { |
14 | - $this->registry->add('emitter', function ($app) { |
|
14 | + $this->registry->add('emitter', function($app) { |
|
15 | 15 | |
16 | 16 | return (new Emitter()) |
17 | 17 | ->setLogger($app->make('logger')); |
@@ -15,7 +15,7 @@ |
||
15 | 15 | |
16 | 16 | if ($config['log_errors'] === true) { |
17 | 17 | |
18 | - $this->registry->add('logger', function () use ($config) { |
|
18 | + $this->registry->add('logger', function() use ($config) { |
|
19 | 19 | return new BaseLogger($config['log_prefix']); |
20 | 20 | }); |
21 | 21 | } |
@@ -63,7 +63,7 @@ |
||
63 | 63 | |
64 | 64 | $route = preg_replace('/{([a-z0-9_-]+)}/i', '(?P<$1>[^/]+)', $route); |
65 | 65 | |
66 | - if(substr($route, -1) === '/') { |
|
66 | + if (substr($route, -1) === '/') { |
|
67 | 67 | $route .= '?'; |
68 | 68 | } |
69 | 69 |