Completed
Branch feature/pre-split (775c2c)
by Anton
02:48
created
source/Spiral/Database/Drivers/SQLite/Schemas/TableSchema.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
     private function columnSchemas(array $include = []): array
84 84
     {
85 85
         $columns = $this->driver->query(
86
-            "PRAGMA TABLE_INFO(" . $this->driver->quote($this->getName()) . ")"
86
+            "PRAGMA TABLE_INFO(".$this->driver->quote($this->getName()).")"
87 87
         );
88 88
 
89 89
         $result = [];
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/MySQL/Schemas/ColumnSchema.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
             }, explode(',', $options));
206 206
 
Please login to merge, or discard this patch.
source/Spiral/Database/Schemas/Prototypes/AbstractTable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
         $this->prefix = $prefix;
103 103
 
104 104
         //Initializing states
105
-        $this->initialState = new TableState($this->prefix . $name);
106
-        $this->currentState = new TableState($this->prefix . $name);
105
+        $this->initialState = new TableState($this->prefix.$name);
106
+        $this->currentState = new TableState($this->prefix.$name);
107 107
 
108 108
         $this->exists = $this->driver->hasTable($this->getName());
109 109
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      */
171 171
     public function setName(string $name): string
172 172
     {
173
-        $this->currentState->setName($this->prefix . $name);
173
+        $this->currentState->setName($this->prefix.$name);
174 174
 
175 175
         return $this->getName();
176 176
     }
Please login to merge, or discard this patch.
source/Spiral/Database/Schemas/Prototypes/AbstractColumn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -748,7 +748,7 @@
 block discarded – undo
748 748
         }
749 749
 
750 750
         if (!empty($enumValues)) {
751
-            return '(' . implode(', ', $enumValues) . ')';
751
+            return '('.implode(', ', $enumValues).')';
752 752
         }
753 753
 
754 754
         return '';
Please login to merge, or discard this patch.
source/Spiral/Database/Schemas/Prototypes/AbstractReference.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -134,10 +134,10 @@  discard block
 block discarded – undo
134 134
         $statement[] = 'CONSTRAINT';
135 135
         $statement[] = $driver->identifier($this->name);
136 136
         $statement[] = 'FOREIGN KEY';
137
-        $statement[] = '(' . $driver->identifier($this->column) . ')';
137
+        $statement[] = '('.$driver->identifier($this->column).')';
138 138
 
139
-        $statement[] = 'REFERENCES ' . $driver->identifier($this->foreignTable);
140
-        $statement[] = '(' . $driver->identifier($this->foreignKey) . ')';
139
+        $statement[] = 'REFERENCES '.$driver->identifier($this->foreignTable);
140
+        $statement[] = '('.$driver->identifier($this->foreignKey).')';
141 141
 
142 142
         $statement[] = "ON DELETE {$this->deleteRule}";
143 143
         $statement[] = "ON UPDATE {$this->updateRule}";
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      */
161 161
     protected function generateName(): string
162 162
     {
163
-        $name = $this->table . '_foreign_' . $this->column . '_' . uniqid();
163
+        $name = $this->table.'_foreign_'.$this->column.'_'.uniqid();
164 164
 
165 165
         if (strlen($name) > 64) {
166 166
             //Many dbs has limitations on identifier length
Please login to merge, or discard this patch.
source/Spiral/Database/Schemas/Prototypes/AbstractIndex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
     protected function generateName(): string
111 111
     {
112 112
         //We can generate name
113
-        $name = $this->table . '_index_' . implode('_', $this->columns) . '_' . uniqid();
113
+        $name = $this->table.'_index_'.implode('_', $this->columns).'_'.uniqid();
114 114
 
115 115
         if (strlen($name) > 64) {
116 116
             //Many dbs has limitations on identifier length
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/SQLite/Schemas/ReferenceSchema.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,10 +21,10 @@
 block discarded – undo
21 21
         $statement = [];
22 22
 
23 23
         $statement[] = 'FOREIGN KEY';
24
-        $statement[] = '(' . $driver->identifier($this->column) . ')';
24
+        $statement[] = '('.$driver->identifier($this->column).')';
25 25
 
26
-        $statement[] = 'REFERENCES ' . $driver->identifier($this->foreignTable);
27
-        $statement[] = '(' . $driver->identifier($this->foreignKey) . ')';
26
+        $statement[] = 'REFERENCES '.$driver->identifier($this->foreignTable);
27
+        $statement[] = '('.$driver->identifier($this->foreignKey).')';
28 28
 
29 29
         $statement[] = "ON DELETE {$this->deleteRule}";
30 30
         $statement[] = "ON UPDATE {$this->updateRule}";
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
@@ -92,14 +92,14 @@  discard block
 block discarded – undo
92 92
     public function getPrimary(string $prefix, string $table): string
93 93
     {
94 94
         if (!empty($this->cacheStore) && empty($this->primaryKeys)) {
95
-            $this->primaryKeys = (array)$this->cacheStore->get($this->getSource() . '/keys');
95
+            $this->primaryKeys = (array)$this->cacheStore->get($this->getSource().'/keys');
96 96
         }
97 97
 
98 98
         if (!empty($this->primaryKeys) && array_key_exists($table, $this->primaryKeys)) {
99 99
             return $this->primaryKeys[$table];
100 100
         }
101 101
 
102
-        if (!$this->hasTable($prefix . $table)) {
102
+        if (!$this->hasTable($prefix.$table)) {
103 103
             throw new DriverException(
104 104
                 "Unable to fetch table primary key, no such table '{$prefix}{$table}' exists"
105 105
             );
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
         //Caching
117 117
         if (!empty($this->memory)) {
118
-            $this->cacheStore->forever($this->getSource() . '/keys', $this->primaryKeys);
118
+            $this->cacheStore->forever($this->getSource().'/keys', $this->primaryKeys);
119 119
         }
120 120
 
121 121
         return $this->primaryKeys[$table];
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     {
131 131
         return $this->factory->make(
132 132
             PostgresQuery::class,
133
-            ['driver' => $this, 'compiler' => $this->queryCompiler($prefix),] + $parameters
133
+            ['driver' => $this, 'compiler' => $this->queryCompiler($prefix), ] + $parameters
134 134
         );
135 135
     }
136 136
 
Please login to merge, or discard this patch.