@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $result = "<?php\n"; |
109 | 109 | |
110 | 110 | if (!$this->docComment->isEmpty()) { |
111 | - $result .= $this->docComment->render($indentLevel) . "\n"; |
|
111 | + $result .= $this->docComment->render($indentLevel)."\n"; |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | if (!empty($this->namespace)) { |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | if (!empty($this->uses)) { |
119 | - $result .= $this->renderUses($indentLevel) . "\n\n"; |
|
119 | + $result .= $this->renderUses($indentLevel)."\n\n"; |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | $result .= $this->elements->render($indentLevel); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | |
137 | 137 | if ($this->isEmbedded()) { |
138 | 138 | throw new DocumentException( |
139 | - "Embedded document '" . get_class($this) . "' can not be saved into collection" |
|
139 | + "Embedded document '".get_class($this)."' can not be saved into collection" |
|
140 | 140 | ); |
141 | 141 | } |
142 | 142 | |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | { |
181 | 181 | if ($this->isEmbedded()) { |
182 | 182 | throw new DocumentException( |
183 | - "Embedded document '" . get_class($this) . "' can not be deleted from collection" |
|
183 | + "Embedded document '".get_class($this)."' can not be deleted from collection" |
|
184 | 184 | ); |
185 | 185 | } |
186 | 186 |
@@ -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 | } |