@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | throw new \Exception("Invalid toastr alert type"); |
33 | 33 | } |
34 | 34 | } catch (\Exception $e) { |
35 | - echo "<pre>alerter error :" . $e.'</pre>'; //TODO See how to handle better, perhaps with a custom error |
|
35 | + echo "<pre>alerter error :".$e.'</pre>'; //TODO See how to handle better, perhaps with a custom error |
|
36 | 36 | die(); |
37 | 37 | } |
38 | 38 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $session = $this->container->getSession(); |
77 | 77 | $alerts = $session->get('alert_messages'); |
78 | 78 | //could return null and need to send back an array. this should never happen since we checked the alerts pending but scrutinizer complains ! |
79 | - if(is_null($alerts)){ |
|
79 | + if (is_null($alerts)) { |
|
80 | 80 | $alerts = []; |
81 | 81 | } |
82 | 82 | $session->remove('alert_messages'); |
@@ -116,7 +116,7 @@ discard block |
||
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 | |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | } |
134 | 134 | |
135 | 135 | //if we are here, then table doesn't exist, check for view |
136 | - $view = 'v_' . $table; |
|
136 | + $view = 'v_'.$table; |
|
137 | 137 | $stmt->bindValue(':table', $view, PDO::PARAM_STR); |
138 | 138 | $stmt->execute(); |
139 | 139 | $exists = $stmt->rowCount() > 0; //will return 1 if table exists or 0 if non existant |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | protected function getRowById($rowId, $table = ''): array |
213 | 213 | { |
214 | 214 | $tableName = $this->getTable($table); |
215 | - $idName = 'id' . $tableName; |
|
215 | + $idName = 'id'.$tableName; |
|
216 | 216 | $sql = "SELECT * FROM $tableName WHERE $idName = :rowId"; |
217 | 217 | $this->query($sql); |
218 | 218 | $this->bind(':rowId', $rowId); |
@@ -59,7 +59,7 @@ discard block |
||
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 | /** |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function getHeaders(): array |
70 | 70 | { |
71 | - if(apache_request_headers() != false){ |
|
71 | + if (apache_request_headers() != false) { |
|
72 | 72 | return apache_request_headers(); |
73 | 73 | } |
74 | 74 | return []; |