Completed
Push — master ( 667eb8...379582 )
by Anton
04:04
created
source/Spiral/Database/Builders/Prototypes/AbstractSelect.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@
 block discarded – undo
226 226
      */
227 227
     private function havingWrapper()
228 228
     {
229
-        return function ($parameter) {
229
+        return function($parameter) {
230 230
             if ($parameter instanceof FragmentInterface) {
231 231
 
232 232
                 //We are only not creating bindings for plan fragments
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/Postgres/PostgresDriver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -115,14 +115,14 @@  discard block
 block discarded – undo
115 115
     public function getPrimary(string $prefix, string $table)
116 116
     {
117 117
         if (!empty($this->memory) && empty($this->primaryKeys)) {
118
-            $this->primaryKeys = (array)$this->memory->loadData($this->getSource() . '.keys');
118
+            $this->primaryKeys = (array)$this->memory->loadData($this->getSource().'.keys');
119 119
         }
120 120
 
121 121
         if (!empty($this->primaryKeys) && array_key_exists($table, $this->primaryKeys)) {
122 122
             return $this->primaryKeys[$table];
123 123
         }
124 124
 
125
-        if (!$this->hasTable($prefix . $table)) {
125
+        if (!$this->hasTable($prefix.$table)) {
126 126
             throw new DriverException(
127 127
                 "Unable to fetch table primary key, no such table '{$prefix}{$table}' exists"
128 128
             );
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
         //Caching
140 140
         if (!empty($this->memory)) {
141
-            $this->memory->saveData($this->getSource() . '.keys', $this->primaryKeys);
141
+            $this->memory->saveData($this->getSource().'.keys', $this->primaryKeys);
142 142
         }
143 143
 
144 144
         return $this->primaryKeys[$table];
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     {
154 154
         return $this->container->make(
155 155
             PostgresInsertQuery::class,
156
-            ['driver' => $this, 'compiler' => $this->queryCompiler($prefix),] + $parameters
156
+            ['driver' => $this, 'compiler' => $this->queryCompiler($prefix), ] + $parameters
157 157
         );
158 158
     }
159 159
 
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/SQLite/Schemas/SQLiteColumn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
 
144 144
         $quoted = $driver->identifier($this->name);
145 145
 
146
-        return "$statement CHECK ({$quoted} IN (" . implode(', ', $enumValues) . '))';
146
+        return "$statement CHECK ({$quoted} IN (".implode(', ', $enumValues).'))';
147 147
     }
148 148
 
149 149
     /**
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/SQLite/SQLiteCompiler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,11 +38,11 @@  discard block
 block discarded – undo
38 38
                     $selectColumns[] = "? AS {$this->quote($column)}";
39 39
                 }
40 40
 
41
-                $statement[] = 'SELECT ' . implode(', ', $selectColumns);
41
+                $statement[] = 'SELECT '.implode(', ', $selectColumns);
42 42
             } else {
43 43
                 //It is crityially important to use UNION ALL, UNION will try to merge values together
44 44
                 //which will cause non predictable insert order
45
-                $statement[] = 'UNION ALL SELECT ' . trim(str_repeat('?, ', count($columns)), ', ');
45
+                $statement[] = 'UNION ALL SELECT '.trim(str_repeat('?, ', count($columns)), ', ');
46 46
             }
47 47
         }
48 48
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $statement = '';
64 64
 
65 65
         if (!empty($limit) || !empty($offset)) {
66
-            $statement = 'LIMIT ' . ($limit ?: '-1') . ' ';
66
+            $statement = 'LIMIT '.($limit ?: '-1').' ';
67 67
         }
68 68
 
69 69
         if (!empty($offset)) {
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/SQLite/SQLiteHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
     {
168 168
         //Temporary table is required to copy data over
169 169
         $temporary = clone $table;
170
-        $temporary->setName('spiral_temp_' . $table->getName() . '_' . uniqid());
170
+        $temporary->setName('spiral_temp_'.$table->getName().'_'.uniqid());
171 171
 
172 172
         //We don't need any indexes in temporary table
173 173
         foreach ($temporary->getIndexes() as $index) {
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/MySQL/Schemas/MySQLColumn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@
 block discarded – undo
200 200
 
201 201
         //Fetching enum values
202 202
         if ($column->abstractType() == 'enum' && !empty($options)) {
203
-            $column->enumValues = array_map(function ($value) {
203
+            $column->enumValues = array_map(function($value) {
204 204
                 return trim($value, $value[0]);
205 205
             }, $options);
206 206
 
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/MySQL/MySQLCompiler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
         if (!empty($limit) || !empty($offset)) {
32 32
             //When limit is not provided (or 0) but offset does we can replace 
33 33
             //limit value with PHP_INT_MAX
34
-            $statement = 'LIMIT ' . ($limit ?: '18446744073709551615') . ' ';
34
+            $statement = 'LIMIT '.($limit ?: '18446744073709551615').' ';
35 35
         }
36 36
 
37 37
         if (!empty($offset)) {
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/MySQL/MySQLDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      */
51 51
     public function identifier(string $identifier): string
52 52
     {
53
-        return $identifier == '*' ? '*' : '`' . str_replace('`', '``', $identifier) . '`';
53
+        return $identifier == '*' ? '*' : '`'.str_replace('`', '``', $identifier).'`';
54 54
     }
55 55
 
56 56
     /**
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/MySQL/MySQLHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
             throw new SchemaException('MySQLHandler can process only MySQL tables');
85 85
         }
86 86
 
87
-        return parent::createStatement($table) . " ENGINE {$table->getEngine()}";
87
+        return parent::createStatement($table)." ENGINE {$table->getEngine()}";
88 88
     }
89 89
 
90 90
     /**
Please login to merge, or discard this patch.