@@ -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 | } |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | if ($column->getName() != $initial->getName()) { |
| 67 | 67 | //Renaming is separate operation |
| 68 | 68 | $this->run("sp_rename ?, ?, 'COLUMN'", [ |
| 69 | - $table->getName() . '.' . $initial->getName(), |
|
| 69 | + $table->getName().'.'.$initial->getName(), |
|
| 70 | 70 | $column->getName() |
| 71 | 71 | ]); |
| 72 | 72 | } |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | ); |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - if ($this->foreignTable != $this->table && !$outerSchema->hasColumn($this->foreignKey)) { |
|
| 87 | + if ($this->foreignTable != $this->table && !$outerSchema->hasColumn($this->foreignKey)) { |
|
| 88 | 88 | throw new ReferenceException( |
| 89 | 89 | "Unable to alter foreign key '{$schema->getName()}'.'{$this->column}'," |
| 90 | 90 | . " foreign column '{$this->foreignTable}'.'{$this->foreignKey}' does not exists" |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | //Executing migration inside global transaction |
| 125 | - $this->execute(function () use ($migration) { |
|
| 125 | + $this->execute(function() use ($migration) { |
|
| 126 | 126 | $migration->up(); |
| 127 | 127 | }); |
| 128 | 128 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | //Executing migration inside global transaction |
| 155 | - $this->execute(function () use ($migration) { |
|
| 155 | + $this->execute(function() use ($migration) { |
|
| 156 | 156 | $migration->down(); |
| 157 | 157 | }); |
| 158 | 158 | |
@@ -61,14 +61,14 @@ |
||
| 61 | 61 | */ |
| 62 | 62 | public function getSchema($database, $table) |
| 63 | 63 | { |
| 64 | - if (!isset($this->schemas[$database . '.' . $table])) { |
|
| 64 | + if (!isset($this->schemas[$database.'.'.$table])) { |
|
| 65 | 65 | $schema = $this->getTable($database, $table)->getSchema(); |
| 66 | 66 | |
| 67 | 67 | //We have to declare existed to prevent dropping existed schema |
| 68 | - $this->schemas[$database . '.' . $table] = $schema->declareExisted(); |
|
| 68 | + $this->schemas[$database.'.'.$table] = $schema->declareExisted(); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - return $this->schemas[$database . '.' . $table]; |
|
| 71 | + return $this->schemas[$database.'.'.$table]; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -187,7 +187,7 @@ |
||
| 187 | 187 | ]); |
| 188 | 188 | |
| 189 | 189 | return $this->files->normalizePath( |
| 190 | - $this->config->getDirectory() . FilesInterface::SEPARATOR . $filename |
|
| 190 | + $this->config->getDirectory().FilesInterface::SEPARATOR.$filename |
|
| 191 | 191 | ); |
| 192 | 192 | } |
| 193 | 193 | } |
| 194 | 194 | \ No newline at end of file |
@@ -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 | |
@@ -317,7 +317,7 @@ |
||
| 317 | 317 | if ( |
| 318 | 318 | is_array($type) |
| 319 | 319 | && is_scalar($type[0]) |
| 320 | - && $filter = $this->builder->getMutators('array::' . $type[0]) |
|
| 320 | + && $filter = $this->builder->getMutators('array::'.$type[0]) |
|
| 321 | 321 | ) { |
| 322 | 322 | //Mutator associated to array with specified type |
| 323 | 323 | $resolved += $filter; |