@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | public function setField($name, $value, $filter = true) |
286 | 286 | { |
287 | 287 | if (!$this->hasField($name)) { |
288 | - throw new FieldException("Undefined field '{$name}' in '" . static::class . "'"); |
|
288 | + throw new FieldException("Undefined field '{$name}' in '".static::class."'"); |
|
289 | 289 | } |
290 | 290 | |
291 | 291 | //Original field value |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | } |
416 | 416 | |
417 | 417 | if (is_array($value)) { |
418 | - array_walk_recursive($value, function (&$value) { |
|
418 | + array_walk_recursive($value, function(&$value) { |
|
419 | 419 | if ($value instanceof \MongoId) { |
420 | 420 | $value = (string)$value; |
421 | 421 | } |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | |
521 | 521 | foreach ($this->atomics as $atomic => $fields) { |
522 | 522 | foreach ($fields as $field => $value) { |
523 | - $atomics[$atomic][$container . '.' . $field] = $value; |
|
523 | + $atomics[$atomic][$container.'.'.$field] = $value; |
|
524 | 524 | } |
525 | 525 | } |
526 | 526 | } |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | if ($value instanceof DocumentAccessorInterface) { |
534 | 534 | $atomics = array_merge_recursive( |
535 | 535 | $atomics, |
536 | - $value->buildAtomics(($container ? $container . '.' : '') . $field) |
|
536 | + $value->buildAtomics(($container ? $container.'.' : '').$field) |
|
537 | 537 | ); |
538 | 538 | |
539 | 539 | continue; |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | |
549 | 549 | if (array_key_exists($field, $this->updates)) { |
550 | 550 | //Generating set operation for changed field |
551 | - $atomics[self::ATOMIC_SET][($container ? $container . '.' : '') . $field] = $value; |
|
551 | + $atomics[self::ATOMIC_SET][($container ? $container.'.' : '').$field] = $value; |
|
552 | 552 | } |
553 | 553 | } |
554 | 554 |
@@ -748,7 +748,7 @@ |
||
748 | 748 | } |
749 | 749 | |
750 | 750 | if (!empty($enumValues)) { |
751 | - return '(' . implode(', ', $enumValues) . ')'; |
|
751 | + return '('.implode(', ', $enumValues).')'; |
|
752 | 752 | } |
753 | 753 | |
754 | 754 | return ''; |
@@ -162,7 +162,7 @@ |
||
162 | 162 | protected function generateName() |
163 | 163 | { |
164 | 164 | //We can generate name |
165 | - $name = $this->table->getName() . '_index_' . implode('_', $this->columns) . '_' . uniqid(); |
|
165 | + $name = $this->table->getName().'_index_'.implode('_', $this->columns).'_'.uniqid(); |
|
166 | 166 | |
167 | 167 | if (strlen($name) > 64) { |
168 | 168 | //Many dbs has limitations on identifier length |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | */ |
265 | 265 | public function identifier($identifier) |
266 | 266 | { |
267 | - return $identifier == '*' ? '*' : '"' . str_replace('"', '""', $identifier) . '"'; |
|
267 | + return $identifier == '*' ? '*' : '"'.str_replace('"', '""', $identifier).'"'; |
|
268 | 268 | } |
269 | 269 | |
270 | 270 | /** |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | protected function savepointCreate($name) |
588 | 588 | { |
589 | 589 | $this->logger()->info("Creating savepoint '{$name}'"); |
590 | - $this->statement('SAVEPOINT ' . $this->identifier("SVP{$name}")); |
|
590 | + $this->statement('SAVEPOINT '.$this->identifier("SVP{$name}")); |
|
591 | 591 | } |
592 | 592 | |
593 | 593 | /** |
@@ -601,7 +601,7 @@ discard block |
||
601 | 601 | protected function savepointRelease($name) |
602 | 602 | { |
603 | 603 | $this->logger()->info("Releasing savepoint '{$name}'"); |
604 | - $this->statement('RELEASE SAVEPOINT ' . $this->identifier("SVP{$name}")); |
|
604 | + $this->statement('RELEASE SAVEPOINT '.$this->identifier("SVP{$name}")); |
|
605 | 605 | } |
606 | 606 | |
607 | 607 | /** |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | protected function savepointRollback($name) |
616 | 616 | { |
617 | 617 | $this->logger()->info("Rolling back savepoint '{$name}'"); |
618 | - $this->statement('ROLLBACK TO SAVEPOINT ' . $this->identifier("SVP{$name}")); |
|
618 | + $this->statement('ROLLBACK TO SAVEPOINT '.$this->identifier("SVP{$name}")); |
|
619 | 619 | } |
620 | 620 | |
621 | 621 | /** |
@@ -120,16 +120,16 @@ |
||
120 | 120 | return sprintf('%F', $parameter); |
121 | 121 | |
122 | 122 | case 'string': |
123 | - return "'" . addcslashes($parameter, "'") . "'"; |
|
123 | + return "'".addcslashes($parameter, "'")."'"; |
|
124 | 124 | |
125 | 125 | case 'object': |
126 | 126 | if (method_exists($parameter, '__toString')) { |
127 | - return "'" . addcslashes((string)$parameter, "'") . "'"; |
|
127 | + return "'".addcslashes((string)$parameter, "'")."'"; |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | if ($parameter instanceof \DateTime) { |
131 | 131 | //Let's process dates different way |
132 | - return "'" . $parameter->format(\DateTime::ISO8601) . "'"; |
|
132 | + return "'".$parameter->format(\DateTime::ISO8601)."'"; |
|
133 | 133 | } |
134 | 134 | } |
135 | 135 |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | public function __call($method, $arguments) |
405 | 405 | { |
406 | 406 | if (!in_array($method = strtoupper($method), ['AVG', 'MIN', 'MAX', 'SUM'])) { |
407 | - throw new BuilderException("Unknown method '{$method}' in '" . get_class($this) . "'"); |
|
407 | + throw new BuilderException("Unknown method '{$method}' in '".get_class($this)."'"); |
|
408 | 408 | } |
409 | 409 | |
410 | 410 | if (!isset($arguments[0]) || count($arguments) > 1) { |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | */ |
454 | 454 | private function havingWrapper() |
455 | 455 | { |
456 | - return function ($parameter) { |
|
456 | + return function($parameter) { |
|
457 | 457 | if ($parameter instanceof FragmentInterface) { |
458 | 458 | //We are only not creating bindings for plan fragments |
459 | 459 | if (!$parameter instanceof ParameterInterface && !$parameter instanceof QueryBuilder) { |
@@ -92,6 +92,6 @@ |
||
92 | 92 | throw new SchemaException('MySQL commander can process only MySQL tables'); |
93 | 93 | } |
94 | 94 | |
95 | - return parent::createStatement($table) . " ENGINE {$table->getEngine()}"; |
|
95 | + return parent::createStatement($table)." ENGINE {$table->getEngine()}"; |
|
96 | 96 | } |
97 | 97 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | $statement = ''; |
55 | 55 | if (!empty($limit) || !empty($offset)) { |
56 | 56 | //When limit is not provided but offset does we can replace limit value with PHP_INT_MAX |
57 | - $statement = 'LIMIT ' . ($limit ?: '18446744073709551615') . ' '; |
|
57 | + $statement = 'LIMIT '.($limit ?: '18446744073709551615').' '; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | if (!empty($offset)) { |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | } |
236 | 236 | |
237 | 237 | $type = "ALTER COLUMN {$this->getName(true)} varchar($enumSize)"; |
238 | - $operations[] = $type . ' ' . ($this->nullable ? 'NULL' : 'NOT NULL'); |
|
238 | + $operations[] = $type.' '.($this->nullable ? 'NULL' : 'NOT NULL'); |
|
239 | 239 | } else { |
240 | 240 | $type = "ALTER COLUMN {$this->getName(true)} {$this->type}"; |
241 | 241 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | $type .= "($this->precision, $this->scale)"; |
248 | 248 | } |
249 | 249 | |
250 | - $operations[] = $type . ' ' . ($this->nullable ? 'NULL' : 'NOT NULL'); |
|
250 | + $operations[] = $type.' '.($this->nullable ? 'NULL' : 'NOT NULL'); |
|
251 | 251 | } |
252 | 252 | } |
253 | 253 | |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | |
434 | 434 | //We made some assumptions here... |
435 | 435 | if (preg_match_all( |
436 | - '/' . $name . '=[\']?([^\']+)[\']?/i', |
|
436 | + '/'.$name.'=[\']?([^\']+)[\']?/i', |
|
437 | 437 | $checkConstraint['definition'], |
438 | 438 | $matches |
439 | 439 | )) { |
@@ -453,6 +453,6 @@ discard block |
||
453 | 453 | */ |
454 | 454 | private function generateName($type) |
455 | 455 | { |
456 | - return $this->table->getName() . '_' . $this->getName() . "_{$type}_" . uniqid(); |
|
456 | + return $this->table->getName().'_'.$this->getName()."_{$type}_".uniqid(); |
|
457 | 457 | } |
458 | 458 | } |