@@ -24,9 +24,9 @@ |
||
24 | 24 | protected function getStub() |
25 | 25 | { |
26 | 26 | if ($this->option('pivot')) { |
27 | - return __DIR__ . '/stubs/pivot.model.stub'; |
|
27 | + return __DIR__.'/stubs/pivot.model.stub'; |
|
28 | 28 | } |
29 | 29 | |
30 | - return __DIR__ . '/stubs/model.stub'; |
|
30 | + return __DIR__.'/stubs/model.stub'; |
|
31 | 31 | } |
32 | 32 | } |
@@ -88,6 +88,6 @@ |
||
88 | 88 | */ |
89 | 89 | public function stubPath() |
90 | 90 | { |
91 | - return __DIR__ . '/stubs'; |
|
91 | + return __DIR__.'/stubs'; |
|
92 | 92 | } |
93 | 93 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | if (Arr::isAssoc($values)) { |
37 | 37 | $values = [$values]; |
38 | 38 | } |
39 | - if (! Arr::isAssoc($values)) { |
|
39 | + if (!Arr::isAssoc($values)) { |
|
40 | 40 | // Here, we will sort the insert keys for every record so that each insert is |
41 | 41 | // in the same order for the record. We need to make sure this is the case |
42 | 42 | // so there are not any errors or problems when inserting these records. |
@@ -56,13 +56,13 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function qualifyColumn($column) |
58 | 58 | { |
59 | - $tableReferer = Str::singular($this->getTable()) . 'Doc'; |
|
59 | + $tableReferer = Str::singular($this->getTable()).'Doc'; |
|
60 | 60 | |
61 | - if (Str::startsWith($column, $tableReferer . '.')) { |
|
61 | + if (Str::startsWith($column, $tableReferer.'.')) { |
|
62 | 62 | return $column; |
63 | 63 | } |
64 | 64 | |
65 | - return $tableReferer . '.' . $column; |
|
65 | + return $tableReferer.'.'.$column; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | $keyName = $this->getKeyName(); |
76 | 76 | |
77 | 77 | if ($keyName[0] != '_') { |
78 | - $keyName = '_' . $keyName; |
|
78 | + $keyName = '_'.$keyName; |
|
79 | 79 | } |
80 | 80 | |
81 | - return Str::snake(class_basename($this)) . $keyName; |
|
81 | + return Str::snake(class_basename($this)).$keyName; |
|
82 | 82 | } |
83 | 83 | } |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | // Usage of a separate DB to read date isn't supported at this time |
146 | 146 | $useReadPdo = null; |
147 | 147 | |
148 | - return $this->run($query, $bindings, function ($query, $bindings) use ($transactionCollections) { |
|
148 | + return $this->run($query, $bindings, function($query, $bindings) use ($transactionCollections) { |
|
149 | 149 | if ($this->pretending()) { |
150 | 150 | return []; |
151 | 151 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $query = $query->query; |
179 | 179 | } |
180 | 180 | |
181 | - return $this->run($query, $bindings, function ($query, $bindings) use ($transactionCollections) { |
|
181 | + return $this->run($query, $bindings, function($query, $bindings) use ($transactionCollections) { |
|
182 | 182 | if ($this->pretending()) { |
183 | 183 | return true; |
184 | 184 | } |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | $query = $query->query; |
217 | 217 | } |
218 | 218 | |
219 | - return $this->run($query, $bindings, function ($query, $bindings) use ($transactionCollections) { |
|
219 | + return $this->run($query, $bindings, function($query, $bindings) use ($transactionCollections) { |
|
220 | 220 | if ($this->pretending()) { |
221 | 221 | return 0; |
222 | 222 | } |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | */ |
251 | 251 | public function unprepared($query) |
252 | 252 | { |
253 | - return $this->run($query, [], function ($query) { |
|
253 | + return $this->run($query, [], function($query) { |
|
254 | 254 | if ($this->pretending()) { |
255 | 255 | return true; |
256 | 256 | } |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | $query = $query->query; |
332 | 332 | } |
333 | 333 | |
334 | - return $this->run($query, $bindings, function ($query, $bindings, $transactionCollections = null) { |
|
334 | + return $this->run($query, $bindings, function($query, $bindings, $transactionCollections = null) { |
|
335 | 335 | if ($this->pretending()) { |
336 | 336 | return []; |
337 | 337 | } |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | protected function creating() |
32 | 32 | { |
33 | - return collect($this->commands)->contains(function ($command) { |
|
33 | + return collect($this->commands)->contains(function($command) { |
|
34 | 34 | return $command->name === 'create'; |
35 | 35 | }); |
36 | 36 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | public function executeCreateCommand($command) |
39 | 39 | { |
40 | 40 | if ($this->connection->pretending()) { |
41 | - $this->connection->logQuery('/* ' . $command->explanation . " */\n", []); |
|
41 | + $this->connection->logQuery('/* '.$command->explanation." */\n", []); |
|
42 | 42 | |
43 | 43 | return; |
44 | 44 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | public function executeIndexCommand($command) |
163 | 163 | { |
164 | 164 | if ($this->connection->pretending()) { |
165 | - $this->connection->logQuery('/* ' . $command->explanation . " */\n", []); |
|
165 | + $this->connection->logQuery('/* '.$command->explanation." */\n", []); |
|
166 | 166 | |
167 | 167 | return; |
168 | 168 | } |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $parameters = []; |
194 | 194 | $parameters['name'] = 'dropIndex'; |
195 | 195 | $parameters['index'] = $name; |
196 | - $parameters['explanation'] = "Drop the '" . $name . "' index on the {$this->table} table."; |
|
196 | + $parameters['explanation'] = "Drop the '".$name."' index on the {$this->table} table."; |
|
197 | 197 | $parameters['handler'] = 'collection'; |
198 | 198 | |
199 | 199 | return $this->addCommand('dropIndex', $parameters); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | public function executeDropIndexCommand($command) |
209 | 209 | { |
210 | 210 | if ($this->connection->pretending()) { |
211 | - $this->connection->logQuery('/* ' . $command->explanation . " */\n", []); |
|
211 | + $this->connection->logQuery('/* '.$command->explanation." */\n", []); |
|
212 | 212 | |
213 | 213 | return; |
214 | 214 | } |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | public function createIndexName($type, array $columns, array $options = []) |
246 | 246 | { |
247 | 247 | $nameParts = []; |
248 | - $nameParts[] = $this->prefix . $this->table; |
|
248 | + $nameParts[] = $this->prefix.$this->table; |
|
249 | 249 | $nameParts = array_merge($nameParts, $columns); |
250 | 250 | $nameParts[] = $type; |
251 | 251 | $nameParts = array_merge($nameParts, array_keys($options)); |
@@ -58,7 +58,7 @@ |
||
58 | 58 | $parameters = []; |
59 | 59 | $parameters['handler'] = 'aql'; |
60 | 60 | $parameters['attributes'] = $columns; |
61 | - $parameters['explanation'] = 'Drop the following column(s): ' . implode(',', $columns) . '.'; |
|
61 | + $parameters['explanation'] = 'Drop the following column(s): '.implode(',', $columns).'.'; |
|
62 | 62 | |
63 | 63 | return $this->addCommand('dropAttribute', compact('parameters')); |
64 | 64 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | $filter = []; |
36 | 36 | foreach ($command->attribute as $attribute) { |
37 | - $filter[] = ['doc.' . $attribute, '!=', null]; |
|
37 | + $filter[] = ['doc.'.$attribute, '!=', null]; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | $aqb = (new QueryBuilder())->for('doc', $collection) |
@@ -59,8 +59,8 @@ discard block |
||
59 | 59 | public function compileRenameAttribute($collection, Fluent $command) |
60 | 60 | { |
61 | 61 | $filter = [ |
62 | - ['doc.' . $command->from, '!=', null], |
|
63 | - ['doc.' . $command->to, '==', null], |
|
62 | + ['doc.'.$command->from, '!=', null], |
|
63 | + ['doc.'.$command->to, '==', null], |
|
64 | 64 | ]; |
65 | 65 | |
66 | 66 | $aqb = (new QueryBuilder())->for('doc', $collection) |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | 'doc', |
70 | 70 | [ |
71 | 71 | $command->from => null, |
72 | - $command->to => 'doc.' . $command->from, |
|
72 | + $command->to => 'doc.'.$command->from, |
|
73 | 73 | ], |
74 | 74 | $collection |
75 | 75 | ) |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | $data = []; |
100 | 100 | foreach ($command->attributes as $attribute) { |
101 | - $filter[] = ['doc.' . $attribute, '!=', null, 'OR']; |
|
101 | + $filter[] = ['doc.'.$attribute, '!=', null, 'OR']; |
|
102 | 102 | $data[$attribute] = null; |
103 | 103 | } |
104 | 104 | $aqb = (new QueryBuilder())->for('doc', $collection) |