Passed
Push — master ( 6dc854...55eca8 )
by Henry
01:59
created
src/IO/Database/SQL.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
     public static function escape($str)
35 35
     {
36 36
         return str_replace(
37
-            ["\\",  "\x00", "\n",  "\r",  "'",  '"', "\x1a"],
38
-            ["\\\\","\\0","\\n", "\\r", "\'", '\"', "\\Z"],
37
+            ["\\", "\x00", "\n", "\r", "'", '"', "\x1a"],
38
+            ["\\\\", "\\0", "\\n", "\\r", "\'", '\"', "\\Z"],
39 39
             $str
40 40
         );
41 41
     }
42 42
 
43
-    public static function compileFields($recordClass,$historyVariant = false)
43
+    public static function compileFields($recordClass, $historyVariant = false)
44 44
     {
45 45
         $queryString = [];
46 46
         $fields = static::getAggregateFieldOptions($recordClass);
@@ -115,9 +115,9 @@  discard block
 block discarded – undo
115 115
             $queryString[] = 'PRIMARY KEY (`RevisionID`)';
116 116
         }
117 117
 
118
-        $queryString = array_merge($queryString,static::compileFields($recordClass, $historyVariant));
118
+        $queryString = array_merge($queryString, static::compileFields($recordClass, $historyVariant));
119 119
 
120
-        if(!$historyVariant) {
120
+        if (!$historyVariant) {
121 121
             // If ContextClass && ContextID are members of this model let's index them
122 122
             if ($recordClass::fieldExists('ContextClass') && $recordClass::fieldExists('ContextID')) {
123 123
                 $queryString[] = static::getContextIndex($recordClass);
@@ -212,10 +212,10 @@  discard block
 block discarded – undo
212 212
                 return 'year';
213 213
 
214 214
             case 'enum':
215
-                return sprintf('enum("%s")', join('","', array_map([static::class,'escape'], $field['values'])));
215
+                return sprintf('enum("%s")', join('","', array_map([static::class, 'escape'], $field['values'])));
216 216
 
217 217
             case 'set':
218
-                return sprintf('set("%s")', join('","', array_map([static::class,'escape'], $field['values'])));
218
+                return sprintf('set("%s")', join('","', array_map([static::class, 'escape'], $field['values'])));
219 219
 
220 220
             default:
221 221
                 throw new Exception("getSQLType: unhandled type $field[type]");
Please login to merge, or discard this patch.