Passed
Push — master ( 666e95...5e6cfd )
by Nicolaas
05:09 queued 01:56
created
src/Api/DatabaseActions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                 $fields = $this->getAllFieldsForOneTable($nonVersionedTable);
51 51
                 $fields = array_combine($fields, $fields);
52 52
                 foreach ($fields as $fieldName) {
53
-                    if (! ($this->hasField($tableName, $fieldName) && $this->hasField($nonVersionedTable, $fieldName))) {
53
+                    if (!($this->hasField($tableName, $fieldName) && $this->hasField($nonVersionedTable, $fieldName))) {
54 54
                         unset($fields[$fieldName]);
55 55
                     }
56 56
                 }
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             // randomise by three years
138 138
             $sql = '
139 139
                 UPDATE "' . $tableName . '"
140
-                SET "' . $fieldName . '" = DATE_ADD("'.$fieldName.'", INTERVAL ((1 - ROUND((RAND()))*2)*999) DAY)
140
+                SET "' . $fieldName . '" = DATE_ADD("' . $fieldName . '", INTERVAL ((1 - ROUND((RAND()))*2)*999) DAY)
141 141
                 WHERE "' . $fieldName . '" IS NOT NULL';
142 142
             $this->executeSql($sql);
143 143
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 
185 185
     public function getAllFieldsForOneTableDetails(string $tableName): array
186 186
     {
187
-        if (! isset(self::$fieldsForTable[$tableName])) {
187
+        if (!isset(self::$fieldsForTable[$tableName])) {
188 188
             self::$fieldsForTable[$tableName] = [];
189 189
             if ($this->hasTable($tableName)) {
190 190
                 self::$fieldsForTable[$tableName] = DB::field_list($tableName);
@@ -225,12 +225,12 @@  discard block
 block discarded – undo
225 225
 
226 226
     protected function isTextField(string $tableName, string $fieldName): bool
227 227
     {
228
-        return $this->isSomeTypeOfField($tableName, $fieldName,self::TEXT_FIELDS);
228
+        return $this->isSomeTypeOfField($tableName, $fieldName, self::TEXT_FIELDS);
229 229
     }
230 230
 
231 231
     protected function isDateField(string $tableName, string $fieldName) : bool
232 232
     {
233
-        return $this->isSomeTypeOfField($tableName, $fieldName,self::DATE_FIELDS);
233
+        return $this->isSomeTypeOfField($tableName, $fieldName, self::DATE_FIELDS);
234 234
     }
235 235
 
236 236
     protected function isSomeTypeOfField(string $tableName, string $fieldName, array $typeStrings) : bool
Please login to merge, or discard this patch.