@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $viewData['showErrors'] = true; //sending the config option down to twig |
| 67 | 67 | $viewData['classException'] = get_class($exception); |
| 68 | 68 | $viewData['stackTrace'] = $exception->getTraceAsString(); |
| 69 | - $viewData['thrownIn'] = $exception->getFile() . " On line " . $exception->getLine(); |
|
| 69 | + $viewData['thrownIn'] = $exception->getFile()." On line ".$exception->getLine(); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | $container = new Container(); |
@@ -74,9 +74,9 @@ discard block |
||
| 74 | 74 | //Making sure that the twig template renders correctly. |
| 75 | 75 | try { |
| 76 | 76 | $twig = $container->getTemplate(); |
| 77 | - $twig->display('ErrorPages/' . $code . '.twig', $viewData); |
|
| 77 | + $twig->display('ErrorPages/'.$code.'.twig', $viewData); |
|
| 78 | 78 | } catch (\Exception $e) { |
| 79 | - echo 'Twig Error : ' . $e->getMessage(); |
|
| 79 | + echo 'Twig Error : '.$e->getMessage(); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | |
@@ -102,7 +102,7 @@ |
||
| 102 | 102 | 500 => '500 Internal Server Error' |
| 103 | 103 | ); |
| 104 | 104 | // ok, validation error, or failure |
| 105 | - header('Status: ' . $status[$code]); |
|
| 105 | + header('Status: '.$status[$code]); |
|
| 106 | 106 | // return the encoded json |
| 107 | 107 | return json_encode(array( |
| 108 | 108 | 'status' => $code < 300, // success or not? |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | $hash = bin2hex($rand); |
| 46 | 46 | $this->session->set('csrf_token', $hash); |
| 47 | 47 | } catch (\Exception $e) { |
| 48 | - echo 'Random generator not present on server: ' . $e->getMessage(); |
|
| 48 | + echo 'Random generator not present on server: '.$e->getMessage(); |
|
| 49 | 49 | } |
| 50 | 50 | } |
| 51 | 51 | } |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | { |
| 60 | 60 | $host = $_SERVER['HTTP_HOST']; |
| 61 | 61 | $https = !empty($_SERVER['HTTPS']) ? 'https' : 'http'; |
| 62 | - return $https . '://' . $host . '/'; |
|
| 62 | + return $https.'://'.$host.'/'; |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | //make sure we have the right type or throw an error |
| 30 | 30 | |
| 31 | 31 | if (!in_array($type, $this->allowedTypes)) { |
| 32 | - throw new \Exception("Invalid toastr alert type " . $type); |
|
| 32 | + throw new \Exception("Invalid toastr alert type ".$type); |
|
| 33 | 33 | } |
| 34 | 34 | $message = [ |
| 35 | 35 | 'type' => $type, |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | } elseif ($this->auth->isUser()) { |
| 16 | 16 | $this->data['userRole'] = 'User'; |
| 17 | 17 | $this->data['userLevel'] = $this->auth->getUserLevel(); |
| 18 | - }else { |
|
| 18 | + } else { |
|
| 19 | 19 | $this->alertBox->setAlert("You must be connected to acces the admin interface", 'warning'); |
| 20 | 20 | $this->container->getResponse()->redirect(); |
| 21 | 21 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $specialNamespace = array_shift($url); |
| 68 | 68 | |
| 69 | 69 | //making sure we have a single backslash |
| 70 | - $specialNamespace = rtrim($specialNamespace, '\\') . '\\'; |
|
| 70 | + $specialNamespace = rtrim($specialNamespace, '\\').'\\'; |
|
| 71 | 71 | |
| 72 | 72 | //capitalize the special namespace |
| 73 | 73 | $specialNamespace = $this->convertToStudlyCaps($specialNamespace); |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | { |
| 135 | 135 | |
| 136 | 136 | //try to create the controller object |
| 137 | - $fullControllerName = $this->currentNamespace . $this->currentController; |
|
| 137 | + $fullControllerName = $this->currentNamespace.$this->currentController; |
|
| 138 | 138 | |
| 139 | 139 | //make sure the class exists before continuing |
| 140 | 140 | if (!class_exists($fullControllerName)) { |
@@ -22,8 +22,8 @@ |
||
| 22 | 22 | $data = []; |
| 23 | 23 | //get the categories from database |
| 24 | 24 | $categories = $this->getResultSet('categories'); |
| 25 | - foreach ( $categories as $category) { |
|
| 26 | - $data +=[ |
|
| 25 | + foreach ($categories as $category) { |
|
| 26 | + $data += [ |
|
| 27 | 27 | $category->category_name => '/category/'.$category->categories_slug |
| 28 | 28 | ]; |
| 29 | 29 | } |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | use Core\Controller; |
| 6 | 6 | |
| 7 | 7 | class Debug extends Controller { |
| 8 | - public function index(){ |
|
| 8 | + public function index() { |
|
| 9 | 9 | |
| 10 | 10 | } |
| 11 | 11 | } |
| 12 | 12 | \ No newline at end of file |