@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | { |
9 | 9 | public static function generateAssets() |
10 | 10 | { |
11 | - switch(APP_ENV) { |
|
11 | + switch (APP_ENV) { |
|
12 | 12 | case 'DEVELOPMENT': |
13 | 13 | $env = '.dev'; |
14 | 14 | break; |
@@ -22,6 +22,6 @@ discard block |
||
22 | 22 | break; |
23 | 23 | } |
24 | 24 | |
25 | - return file_get_contents(__DIR__ . '/../../../assets/spa/index'.$env.'.html'); |
|
25 | + return file_get_contents(__DIR__ . '/../../../assets/spa/index' . $env . '.html'); |
|
26 | 26 | } |
27 | 27 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | // Set character encoding |
28 | 28 | $app['charset'] = 'UTF-8'; |
29 | 29 | |
30 | -if(DEBUG) { |
|
30 | +if (DEBUG) { |
|
31 | 31 | error_reporting(E_ALL); |
32 | 32 | ini_set('display_errors', 1); |
33 | 33 | $app['debug'] = true; |
@@ -41,16 +41,16 @@ discard block |
||
41 | 41 | |
42 | 42 | // Register Monolog service provider for local logging |
43 | 43 | $app->register(new MonologServiceProvider(), array( |
44 | - 'monolog.logfile' => __DIR__.LOG_PATH, |
|
44 | + 'monolog.logfile' => __DIR__ . LOG_PATH, |
|
45 | 45 | 'monolog.name' => APP_NAME, |
46 | 46 | 'monolog.level' => LOG_LEVEL |
47 | 47 | )); |
48 | 48 | |
49 | 49 | // Error handler |
50 | 50 | $app->error(function(\Exception $e, $code) use ($app) { |
51 | - if($app['debug']) return; |
|
51 | + if ($app['debug']) return; |
|
52 | 52 | |
53 | - switch($code) { |
|
53 | + switch ($code) { |
|
54 | 54 | case 404: |
55 | 55 | return $app->redirect('/'); |
56 | 56 | break; |
@@ -64,6 +64,6 @@ discard block |
||
64 | 64 | }); |
65 | 65 | |
66 | 66 | // Load routes |
67 | -foreach(glob(__DIR__ . "/src/Kineo/Route/*.php") as $filename) { |
|
67 | +foreach (glob(__DIR__ . "/src/Kineo/Route/*.php") as $filename) { |
|
68 | 68 | require_once $filename; |
69 | 69 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | $result = $stmt->fetchAll(\PDO::FETCH_ASSOC); |
24 | 24 | |
25 | - if(is_array($result) && !empty($result)) { |
|
25 | + if (is_array($result) && !empty($result)) { |
|
26 | 26 | $this->constituencies = $result; |
27 | 27 | |
28 | 28 | return $this->constituencies; |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | $result = $stmt->fetchAll(\PDO::FETCH_ASSOC); |
24 | 24 | |
25 | - if(is_array($result) && !empty($result)) { |
|
25 | + if (is_array($result) && !empty($result)) { |
|
26 | 26 | $this->constituencies = $result; |
27 | 27 | |
28 | 28 | return $this->constituencies; |