Passed
Push — master ( edcad2...a41dc2 )
by Nícollas
01:49
created
Source/Model/SimplePHP.class.php 2 patches
Switch Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -166,8 +166,8 @@
 block discarded – undo
166 166
                         }
167 167
                     }
168 168
                     break;
169
-            default:
170
-                return [];
169
+                default:
170
+                    return [];
171 171
             }
172 172
         }
173 173
     }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -152,17 +152,17 @@  discard block
 block discarded – undo
152 152
      */
153 153
     private function deny()
154 154
     {
155
-        if(!empty($this->excepts)) {
155
+        if (!empty($this->excepts)) {
156 156
             switch (!is_object($this->data) && $count = count($this->data)) {
157 157
                 case (!isset($this->data[0]) && !empty($this->data)):
158
-                    foreach($this->excepts as $except) {
159
-                        if(isset($this->data[$except])) unset($this->data[$except]);
158
+                    foreach ($this->excepts as $except) {
159
+                        if (isset($this->data[$except])) unset($this->data[$except]);
160 160
                     }
161 161
                     break;
162 162
                 case ($count >= 2 && isset($this->data[0])):
163
-                    foreach($this->excepts as $except) {
164
-                        for($i = 0; $i < $count; $i++) {
165
-                            if(isset($this->data[$i][$except])) unset($this->data[$i][$except]);
163
+                    foreach ($this->excepts as $except) {
164
+                        for ($i = 0; $i < $count; $i++) {
165
+                            if (isset($this->data[$i][$except])) unset($this->data[$i][$except]);
166 166
                         }
167 167
                     }
168 168
                     break;
@@ -180,11 +180,10 @@  discard block
 block discarded – undo
180 180
         try {
181 181
             $execute = $this->conn->query("SELECT {$this->params} FROM {$this->table} {$this->where} {$this->order} {$this->limit} {$this->offset}");
182 182
             $execute->rowCount() > 1 ? 
183
-                    $this->data = ($this->type ? $execute->fetchAll(PDO::FETCH_CLASS, static::class) : $execute->fetchAll(PDO::FETCH_ASSOC)) :
184
-                    $this->data = ($this->type ? $execute->fetchObject(static::class) : $execute->fetch(PDO::FETCH_ASSOC));
183
+                    $this->data = ($this->type ? $execute->fetchAll(PDO::FETCH_CLASS, static::class) : $execute->fetchAll(PDO::FETCH_ASSOC)) : $this->data = ($this->type ? $execute->fetchObject(static::class) : $execute->fetch(PDO::FETCH_ASSOC));
185 184
             $this->deny();
186 185
             return $this->data;
187
-        } catch(PDOException $exc) {
186
+        } catch (PDOException $exc) {
188 187
             return $exc->getMessage();
189 188
         }
190 189
     }
Please login to merge, or discard this patch.