Passed
Push — Showing-Posts ( 7eacb0...555668 )
by Stone
03:19 queued 55s
created
Core/Error.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Core/AjaxController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
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?
Please login to merge, or discard this patch.
Core/Modules/Csrf.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Core/Modules/AlertBox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
Core/Router.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)) {
Please login to merge, or discard this patch.
App/Controllers/Debug.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
Core/Container.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
         $twigOptions = [];
48 48
         if (!Config::DEV_ENVIRONMENT) {
49 49
             $twigOptions = [
50
-                'cache' => dirname(__DIR__) . '/Cache'
50
+                'cache' => dirname(__DIR__).'/Cache'
51 51
             ];
52 52
         }
53
-        $loader = new \Twig_Loader_Filesystem(dirname(__DIR__) . '/App/Views');
53
+        $loader = new \Twig_Loader_Filesystem(dirname(__DIR__).'/App/Views');
54 54
         $twig = new \Twig_Environment($loader, $twigOptions);
55 55
 
56 56
         return $twig;
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
         if ($this->dbh) {
66 66
             return $this->dbh;
67 67
         }
68
-        $dsn = "mysql:host=" . Config::DB_HOST . ";dbname=" . Config::DB_NAME . ";charset=utf8"; //Creating the Data Source name
68
+        $dsn = "mysql:host=".Config::DB_HOST.";dbname=".Config::DB_NAME.";charset=utf8"; //Creating the Data Source name
69 69
         $opt = [
70 70
             PDO::ATTR_PERSISTENT => true,
71 71
             PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
72 72
             PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ
73 73
         ];
74
-        $this->dbh = new PDO($dsn, Config::DB_USER, Config::DB_PASSWORD, $opt);;
74
+        $this->dbh = new PDO($dsn, Config::DB_USER, Config::DB_PASSWORD, $opt); ;
75 75
         return $this->dbh;
76 76
     }
77 77
 
Please login to merge, or discard this patch.
Core/Dependency/Response.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
             default:
24 24
                 $headerType = 'text/html';
25 25
         }
26
-        $contentType = 'Content-Type: ' . $headerType;
26
+        $contentType = 'Content-Type: '.$headerType;
27 27
 
28 28
         header($contentType);
29 29
     }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             }
42 42
         }
43 43
 
44
-        header("location: /" . $url);
44
+        header("location: /".$url);
45 45
         exit(); //after redirect do not execute anything else from the function
46 46
     }
47 47
 }
48 48
\ No newline at end of file
Please login to merge, or discard this patch.
Core/Controller.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -84,12 +84,12 @@  discard block
 block discarded – undo
84 84
         $loadModuleObj = $this->getModuleNamespace($loadModule);
85 85
         //Modules must be children of the Module template
86 86
         if (!is_subclass_of($loadModuleObj, 'Core\Modules\Module')) {
87
-            throw new \ErrorException('Module ' . $loadModuleName . ' must be a sub class of module');
87
+            throw new \ErrorException('Module '.$loadModuleName.' must be a sub class of module');
88 88
         }
89 89
         $loadedModule = new $loadModuleObj($this->container);
90 90
         //we are not allowed to create public modules, they must be a placeholder ready
91 91
         if (!property_exists($this, $loadModuleName)) {
92
-            throw new \ErrorException('the protected or private variable of ' . $loadModuleName . ' is not present');
92
+            throw new \ErrorException('the protected or private variable of '.$loadModuleName.' is not present');
93 93
         }
94 94
         $this->$loadModuleName = $loadedModule;
95 95
     }
@@ -106,23 +106,23 @@  discard block
 block discarded – undo
106 106
         $childClass = new \ReflectionClass(get_class($this));
107 107
         $childClassNamespace = $childClass->getNamespaceName();
108 108
         //check in classNameSpace
109
-        if (class_exists($childClassNamespace . '\\Modules\\' . $loadModule)) {
110
-            $this->addToDevHelper('module ' . $loadModule . ' loaded', $childClassNamespace . '\\' . $loadModule);
111
-            return $childClassNamespace . '\\' . $loadModule;
109
+        if (class_exists($childClassNamespace.'\\Modules\\'.$loadModule)) {
110
+            $this->addToDevHelper('module '.$loadModule.' loaded', $childClassNamespace.'\\'.$loadModule);
111
+            return $childClassNamespace.'\\'.$loadModule;
112 112
         }
113 113
         //check in app
114
-        if (class_exists('App\\Modules\\' . $loadModule)) {
115
-            $this->addToDevHelper('module ' . $loadModule . ' loaded', 'App\\Modules\\' . $loadModule);
116
-            return 'App\\Modules\\' . $loadModule;
114
+        if (class_exists('App\\Modules\\'.$loadModule)) {
115
+            $this->addToDevHelper('module '.$loadModule.' loaded', 'App\\Modules\\'.$loadModule);
116
+            return 'App\\Modules\\'.$loadModule;
117 117
         }
118 118
         //check in core, send error popup if overcharged
119
-        if (class_exists('Core\\Modules\\' . $loadModule)) {
120
-            $this->addToDevHelper('module ' . $loadModule . ' loaded', 'Core\\Modules\\' . $loadModule);
121
-            return 'Core\\Modules\\' . $loadModule;
119
+        if (class_exists('Core\\Modules\\'.$loadModule)) {
120
+            $this->addToDevHelper('module '.$loadModule.' loaded', 'Core\\Modules\\'.$loadModule);
121
+            return 'Core\\Modules\\'.$loadModule;
122 122
         }
123 123
 
124 124
         //if we are here then no module found
125
-        throw new \ErrorException('module ' . $loadModule . ' does not exist or not loaded');
125
+        throw new \ErrorException('module '.$loadModule.' does not exist or not loaded');
126 126
 
127 127
     }
128 128
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     public function getView($template)
148 148
     {
149 149
         $twig = $this->container->getTemplate();
150
-        return $twig->render($template . '.twig', $this->data);
150
+        return $twig->render($template.'.twig', $this->data);
151 151
     }
152 152
 
153 153
     /**
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
             $this->devHelper();
170 170
         }
171 171
         $twig = $this->container->getTemplate();
172
-        $twig->display($template . '.twig', $this->data);
172
+        $twig->display($template.'.twig', $this->data);
173 173
     }
174 174
 
175 175
     /**
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
     protected function addToDevHelper($name, $var)
202 202
     {
203 203
         //only populate if in dev environment
204
-        if (Config::DEV_ENVIRONMENT){
204
+        if (Config::DEV_ENVIRONMENT) {
205 205
             $classMethods = [];
206 206
             $classMethods[$name] = $var;
207 207
             if (!isset($this->data['dev_info'])) {
Please login to merge, or discard this patch.