@@ -8,7 +8,8 @@ discard block |
||
8 | 8 | * @copyright Copyright (c) 2015, Austin Artistic Reconstruction |
9 | 9 | * @license http://www.apache.org/licenses/ Apache 2.0 License |
10 | 10 | */ |
11 | -spl_autoload_register(function ($class) { |
|
11 | +spl_autoload_register(function ($class) |
|
12 | +{ |
|
12 | 13 | |
13 | 14 | // project-specific namespace prefix |
14 | 15 | $prefix = 'Flipside\\'; |
@@ -18,7 +19,8 @@ discard block |
||
18 | 19 | |
19 | 20 | // does the class use the namespace prefix? |
20 | 21 | $len = strlen($prefix); |
21 | - if (strncmp($prefix, $class, $len) !== 0) { |
|
22 | + if (strncmp($prefix, $class, $len) !== 0) |
|
23 | + { |
|
22 | 24 | // no, move to the next registered autoloader |
23 | 25 | return; |
24 | 26 | } |
@@ -32,7 +34,8 @@ discard block |
||
32 | 34 | $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php'; |
33 | 35 | |
34 | 36 | // if the file exists, require it |
35 | - if (file_exists($file)) { |
|
37 | + if (file_exists($file)) |
|
38 | + { |
|
36 | 39 | require $file; |
37 | 40 | } |
38 | 41 | }); |
@@ -13,7 +13,9 @@ discard block |
||
13 | 13 | $settings = array("settings"=>["determineRouteBeforeAppMiddleware"=>true]); |
14 | 14 | parent::__construct($settings); |
15 | 15 | $c = $this->getContainer(); |
16 | - $c['errorHandler'] = function($c) { return new WebErrorHandler();}; |
|
16 | + $c['errorHandler'] = function($c) |
|
17 | + { |
|
18 | +return new WebErrorHandler();}; |
|
17 | 19 | $this->add(new AuthMiddleware()); |
18 | 20 | $this->add(new ODataMiddleware()); |
19 | 21 | } |
@@ -25,7 +27,9 @@ discard block |
||
25 | 27 | |
26 | 28 | public function registerAPI($uri, $api) |
27 | 29 | { |
28 | - $group = $this->group($uri, function() use($api){$api->setup($this);}); |
|
30 | + $group = $this->group($uri, function() use($api) |
|
31 | + { |
|
32 | +$api->setup($this);}); |
|
29 | 33 | $group->add(new \Flipside\Http\Rest\SerializationMiddleware()); |
30 | 34 | $group->add(new \Flipside\Http\Rest\CORSMiddleware($this->getContainer())); |
31 | 35 | } |