Passed
Pull Request — master (#44)
by Stone
03:09 queued 23s
created
Core/Model.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -116,11 +116,11 @@  discard block
 block discarded – undo
116 116
         if ($table === null) {
117 117
             $reflect = new \ReflectionClass(get_class($this));
118 118
             $table = $reflect->getShortName(); //this is to only get the model name, otherwise we get the full namespace
119
-            $table = $table . 's'; //adding the s since the table should be plural. Might be some special case where the plural isn't just with an s
119
+            $table = $table.'s'; //adding the s since the table should be plural. Might be some special case where the plural isn't just with an s
120 120
             $table = strtolower($table); //the database names are in lowercase
121 121
         }
122 122
 
123
-        if(Config::TABLE_PREFIX != '')
123
+        if (Config::TABLE_PREFIX != '')
124 124
         {
125 125
             $table = Config::TABLE_PREFIX.'_'.$table;
126 126
         }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         }
139 139
 
140 140
         //if we are here, then table doesn't exist, check for view
141
-        $view = 'v_' . $table;
141
+        $view = 'v_'.$table;
142 142
         $stmt->bindValue(':table', $view, PDO::PARAM_STR);
143 143
         $stmt->execute();
144 144
         $exists = $stmt->rowCount() > 0; //will return 1 if table exists or 0 if non existant
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     protected function getRowById($rowId, $table = ''): array
218 218
     {
219 219
         $tableName = $this->getTable($table);
220
-        $idName = 'id' . $tableName;
220
+        $idName = 'id'.$tableName;
221 221
         $sql = "SELECT * FROM $tableName WHERE $idName = :rowId";
222 222
         $this->query($sql);
223 223
         $this->bind(':rowId', $rowId);
Please login to merge, or discard this patch.
Core/Controller.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
         //We load all our module objects into our object
62 62
         foreach ($this->loadModules as $loadModule) {
63
-            $loadModuleObj = 'Core\\Modules\\' . $loadModule;
63
+            $loadModuleObj = 'Core\\Modules\\'.$loadModule;
64 64
 
65 65
             $loadModuleName = lcfirst($loadModule);
66 66
             $loadedModule = new $loadModuleObj($this->container);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
             //we are not allowed to create public modules, they must be a placeholder ready
73 73
             if (!property_exists($this, $loadModuleName)) {
74
-                throw new \ErrorException('class var ' . $loadModuleName . ' not present');
74
+                throw new \ErrorException('class var '.$loadModuleName.' not present');
75 75
             }
76 76
             $this->$loadModuleName = $loadedModule;
77 77
         }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     public function getView($template)
103 103
     {
104 104
         $twig = $this->container->getTemplate();
105
-        return $twig->render($template . '.twig', $this->data);
105
+        return $twig->render($template.'.twig', $this->data);
106 106
     }
107 107
 
108 108
     /**
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         }
122 122
 
123 123
         $twig = $this->container->getTemplate();
124
-        $twig->display($template . '.twig', $this->data);
124
+        $twig->display($template.'.twig', $this->data);
125 125
     }
126 126
 
127 127
 }
128 128
\ No newline at end of file
Please login to merge, or discard this patch.