@@ -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 |
@@ -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 | |
@@ -60,14 +60,14 @@ |
||
| 60 | 60 | */ |
| 61 | 61 | public function getSchema(string $table, string $database = null): AbstractTable |
| 62 | 62 | { |
| 63 | - if (!isset($this->schemas[$database . '.' . $table])) { |
|
| 63 | + if (!isset($this->schemas[$database.'.'.$table])) { |
|
| 64 | 64 | $schema = $this->getTable($table, $database)->getSchema(); |
| 65 | 65 | |
| 66 | 66 | //We have to declare existed to prevent dropping existed schema |
| 67 | - $this->schemas[$database . '.' . $table] = $schema; |
|
| 67 | + $this->schemas[$database.'.'.$table] = $schema; |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - return $this->schemas[$database . '.' . $table]; |
|
| 70 | + return $this->schemas[$database.'.'.$table]; |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | /** |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | if (!$hideHeader && !empty($name)) { |
| 129 | 129 | //Showing element name (if any provided) |
| 130 | - $header = $indent . $this->style->apply($name, 'name'); |
|
| 130 | + $header = $indent.$this->style->apply($name, 'name'); |
|
| 131 | 131 | |
| 132 | 132 | //Showing equal sing |
| 133 | 133 | $header .= $this->style->apply(' = ', 'syntax', '='); |
@@ -137,24 +137,24 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | if ($level > $this->maxLevel) { |
| 139 | 139 | //Dumper is not reference based, we can't dump too deep values |
| 140 | - return $indent . $this->style->apply('-too deep-', 'maxLevel') . "\n"; |
|
| 140 | + return $indent.$this->style->apply('-too deep-', 'maxLevel')."\n"; |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | $type = strtolower(gettype($value)); |
| 144 | 144 | |
| 145 | 145 | if ($type == 'array') { |
| 146 | - return $header . $this->dumpArray($value, $level, $hideHeader); |
|
| 146 | + return $header.$this->dumpArray($value, $level, $hideHeader); |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | if ($type == 'object') { |
| 150 | - return $header . $this->dumpObject($value, $level, $hideHeader); |
|
| 150 | + return $header.$this->dumpObject($value, $level, $hideHeader); |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | if ($type == 'resource') { |
| 154 | 154 | //No need to dump resource value |
| 155 | - $element = get_resource_type($value) . ' resource '; |
|
| 155 | + $element = get_resource_type($value).' resource '; |
|
| 156 | 156 | |
| 157 | - return $header . $this->style->apply($element, 'type', 'resource') . "\n"; |
|
| 157 | + return $header.$this->style->apply($element, 'type', 'resource')."\n"; |
|
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | //Value length |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | //Including value |
| 184 | - return $header . ' ' . $this->style->apply($element, 'value', $type) . "\n"; |
|
| 184 | + return $header.' '.$this->style->apply($element, 'value', $type)."\n"; |
|
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | /** |
@@ -199,8 +199,8 @@ discard block |
||
| 199 | 199 | $count = count($array); |
| 200 | 200 | |
| 201 | 201 | //Array size and scope |
| 202 | - $output = $this->style->apply("array({$count})", 'type', 'array') . "\n"; |
|
| 203 | - $output .= $indent . $this->style->apply('[', 'syntax', '[') . "\n"; |
|
| 202 | + $output = $this->style->apply("array({$count})", 'type', 'array')."\n"; |
|
| 203 | + $output .= $indent.$this->style->apply('[', 'syntax', '[')."\n"; |
|
| 204 | 204 | } else { |
| 205 | 205 | $output = ''; |
| 206 | 206 | } |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | |
| 220 | 220 | if (!$hideHeader) { |
| 221 | 221 | //Closing array scope |
| 222 | - $output .= $indent . $this->style->apply(']', 'syntax', ']') . "\n"; |
|
| 222 | + $output .= $indent.$this->style->apply(']', 'syntax', ']')."\n"; |
|
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | return $output; |
@@ -242,10 +242,10 @@ discard block |
||
| 242 | 242 | $indent = $this->style->indent($level); |
| 243 | 243 | |
| 244 | 244 | if (!$hideHeader) { |
| 245 | - $type = ($class ?: get_class($object)) . ' object '; |
|
| 245 | + $type = ($class ?: get_class($object)).' object '; |
|
| 246 | 246 | |
| 247 | - $header = $this->style->apply($type, 'type', 'object') . "\n"; |
|
| 248 | - $header .= $indent . $this->style->apply('(', 'syntax', '(') . "\n"; |
|
| 247 | + $header = $this->style->apply($type, 'type', 'object')."\n"; |
|
| 248 | + $header .= $indent.$this->style->apply('(', 'syntax', '(')."\n"; |
|
| 249 | 249 | } else { |
| 250 | 250 | $header = ''; |
| 251 | 251 | } |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | |
| 271 | 271 | return $header |
| 272 | 272 | . $this->dumpValue($debugInfo, '', $level + (is_scalar($object)), true) |
| 273 | - . $indent . $this->style->apply(')', 'syntax', ')') . "\n"; |
|
| 273 | + . $indent.$this->style->apply(')', 'syntax', ')')."\n"; |
|
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | $refection = new \ReflectionObject($object); |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | } |
| 282 | 282 | |
| 283 | 283 | //Header, content, footer |
| 284 | - return $header . $output . $indent . $this->style->apply(')', 'syntax', ')') . "\n"; |
|
| 284 | + return $header.$output.$indent.$this->style->apply(')', 'syntax', ')')."\n"; |
|
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | /** |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | $name = $this->style->apply($property->getName(), 'dynamic'); |
| 317 | 317 | } else { |
| 318 | 318 | //Property name includes access level |
| 319 | - $name = $property->getName() . $this->style->apply(':' . $access, 'access', $access); |
|
| 319 | + $name = $property->getName().$this->style->apply(':'.$access, 'access', $access); |
|
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | return $this->dumpValue($property->getValue($object), $name, $level + 1); |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | $reflection = new \ReflectionFunction($closure); |
| 335 | 335 | |
| 336 | 336 | return [ |
| 337 | - 'name' => $reflection->getName() . " (lines {$reflection->getStartLine()}:{$reflection->getEndLine()})", |
|
| 337 | + 'name' => $reflection->getName()." (lines {$reflection->getStartLine()}:{$reflection->getEndLine()})", |
|
| 338 | 338 | 'file' => $reflection->getFileName(), |
| 339 | 339 | 'this' => $reflection->getClosureThis() |
| 340 | 340 | ]; |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | //Syncing pivot data values |
| 286 | - $command->onComplete(function (ContextualCommandInterface $command) use ($record) { |
|
| 286 | + $command->onComplete(function(ContextualCommandInterface $command) use ($record) { |
|
| 287 | 287 | //Now when we are done we can sync our values with current data |
| 288 | 288 | $this->pivotData->offsetSet( |
| 289 | 289 | $record, |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | ContextualCommandInterface $outerCommand |
| 331 | 331 | ) { |
| 332 | 332 | //Parent record dependency |
| 333 | - $parentCommand->onExecute(function ($parentCommand) use ($pivotCommand, $parent) { |
|
| 333 | + $parentCommand->onExecute(function($parentCommand) use ($pivotCommand, $parent) { |
|
| 334 | 334 | $pivotCommand->addContext( |
| 335 | 335 | $this->key(Record::THOUGHT_INNER_KEY), |
| 336 | 336 | $this->lookupKey(Record::INNER_KEY, $parent, $parentCommand) |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | }); |
| 339 | 339 | |
| 340 | 340 | //Outer record dependency |
| 341 | - $outerCommand->onExecute(function ($outerCommand) use ($pivotCommand, $outer) { |
|
| 341 | + $outerCommand->onExecute(function($outerCommand) use ($pivotCommand, $outer) { |
|
| 342 | 342 | $pivotCommand->addContext( |
| 343 | 343 | $this->key(Record::THOUGHT_OUTER_KEY), |
| 344 | 344 | $this->lookupKey(Record::OUTER_KEY, $outer, $outerCommand) |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | $loader, |
| 405 | 405 | [ |
| 406 | 406 | 'alias' => $table->getName(), |
| 407 | - 'pivotAlias' => $table->getName() . '_pivot', |
|
| 407 | + 'pivotAlias' => $table->getName().'_pivot', |
|
| 408 | 408 | 'method' => RelationLoader::POSTLOAD |
| 409 | 409 | ] |
| 410 | 410 | ); |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | $query = $loader->configureQuery($query, [$innerKey]); |
| 415 | 415 | |
| 416 | 416 | //Additional pivot conditions |
| 417 | - $pivotDecorator = new WhereDecorator($query, 'onWhere', $table->getName() . '_pivot'); |
|
| 417 | + $pivotDecorator = new WhereDecorator($query, 'onWhere', $table->getName().'_pivot'); |
|
| 418 | 418 | $pivotDecorator->where($this->schema[Record::WHERE_PIVOT]); |
| 419 | 419 | |
| 420 | 420 | //Additional where conditions! |
@@ -479,7 +479,7 @@ discard block |
||
| 479 | 479 | { |
| 480 | 480 | if ($diff = array_diff(array_keys($pivotData), $this->schema[Record::PIVOT_COLUMNS])) { |
| 481 | 481 | throw new RelationException( |
| 482 | - "Invalid pivot data, undefined columns found: " . join(', ', $diff) |
|
| 482 | + "Invalid pivot data, undefined columns found: ".join(', ', $diff) |
|
| 483 | 483 | ); |
| 484 | 484 | } |
| 485 | 485 | } |
@@ -133,8 +133,8 @@ discard block |
||
| 133 | 133 | protected function declareIndexes(Source $source, StateComparator $comparator) |
| 134 | 134 | { |
| 135 | 135 | foreach ($comparator->addedIndexes() as $index) { |
| 136 | - $columns = '[\'' . join('\', \'', $index->getColumns()) . '\']'; |
|
| 137 | - $source->addString(" ->addIndex({$columns}, " . $this->indexOptions($index) . ")"); |
|
| 136 | + $columns = '[\''.join('\', \'', $index->getColumns()).'\']'; |
|
| 137 | + $source->addString(" ->addIndex({$columns}, ".$this->indexOptions($index).")"); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | foreach ($comparator->alteredIndexes() as $pair) { |
@@ -143,12 +143,12 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | $index = $pair[self::NEW_STATE]; |
| 145 | 145 | |
| 146 | - $columns = '[\'' . join('\', \'', $index->getColumns()) . '\']'; |
|
| 147 | - $source->addString(" ->alterIndex({$columns}, " . $this->indexOptions($index) . ")"); |
|
| 146 | + $columns = '[\''.join('\', \'', $index->getColumns()).'\']'; |
|
| 147 | + $source->addString(" ->alterIndex({$columns}, ".$this->indexOptions($index).")"); |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | foreach ($comparator->droppedIndexes() as $index) { |
| 151 | - $columns = '[\'' . join('\', \'', $index->getColumns()) . '\']'; |
|
| 151 | + $columns = '[\''.join('\', \'', $index->getColumns()).'\']'; |
|
| 152 | 152 | $source->addString(" ->dropIndex({$columns})"); |
| 153 | 153 | } |
| 154 | 154 | } |
@@ -165,11 +165,11 @@ discard block |
||
| 165 | 165 | ) { |
| 166 | 166 | foreach ($comparator->addedForeigns() as $foreign) { |
| 167 | 167 | $column = "'{$foreign->getColumn()}'"; |
| 168 | - $table = "'" . substr($foreign->getForeignTable(), strlen($prefix)) . "'"; |
|
| 168 | + $table = "'".substr($foreign->getForeignTable(), strlen($prefix))."'"; |
|
| 169 | 169 | $key = "'{$foreign->getForeignKey()}'"; |
| 170 | 170 | |
| 171 | 171 | $source->addString( |
| 172 | - " ->addForeignKey({$column}, {$table}, {$key}, " . $this->foreignOptions($foreign) . ")" |
|
| 172 | + " ->addForeignKey({$column}, {$table}, {$key}, ".$this->foreignOptions($foreign).")" |
|
| 173 | 173 | ); |
| 174 | 174 | } |
| 175 | 175 | |
@@ -180,11 +180,11 @@ discard block |
||
| 180 | 180 | $foreign = $pair[self::NEW_STATE]; |
| 181 | 181 | |
| 182 | 182 | $column = "'{$foreign->getColumn()}'"; |
| 183 | - $table = "'" . substr($foreign->getForeignTable(), strlen($prefix)) . "'"; |
|
| 183 | + $table = "'".substr($foreign->getForeignTable(), strlen($prefix))."'"; |
|
| 184 | 184 | $key = "'{$foreign->getForeignKey()}'"; |
| 185 | 185 | |
| 186 | 186 | $source->addString( |
| 187 | - " ->alterForeignKey({$column}, {$table}, {$key}, " . $this->foreignOptions($foreign) . ")" |
|
| 187 | + " ->alterForeignKey({$column}, {$table}, {$key}, ".$this->foreignOptions($foreign).")" |
|
| 188 | 188 | ); |
| 189 | 189 | } |
| 190 | 190 | |
@@ -230,8 +230,8 @@ discard block |
||
| 230 | 230 | protected function revertIndexes(Source $source, StateComparator $comparator) |
| 231 | 231 | { |
| 232 | 232 | foreach ($comparator->droppedIndexes() as $index) { |
| 233 | - $columns = '[\'' . join('\', \'', $index->getColumns()) . '\']'; |
|
| 234 | - $source->addString(" ->addIndex({$columns}, " . $this->indexOptions($index) . ")"); |
|
| 233 | + $columns = '[\''.join('\', \'', $index->getColumns()).'\']'; |
|
| 234 | + $source->addString(" ->addIndex({$columns}, ".$this->indexOptions($index).")"); |
|
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | foreach ($comparator->alteredIndexes() as $pair) { |
@@ -240,12 +240,12 @@ discard block |
||
| 240 | 240 | */ |
| 241 | 241 | $index = $pair[self::ORIGINAL_STATE]; |
| 242 | 242 | |
| 243 | - $columns = '[\'' . join('\', \'', $index->getColumns()) . '\']'; |
|
| 244 | - $source->addString(" ->alterIndex({$columns}, " . $this->indexOptions($index) . ")"); |
|
| 243 | + $columns = '[\''.join('\', \'', $index->getColumns()).'\']'; |
|
| 244 | + $source->addString(" ->alterIndex({$columns}, ".$this->indexOptions($index).")"); |
|
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | foreach ($comparator->addedIndexes() as $index) { |
| 248 | - $columns = '[\'' . join('\', \'', $index->getColumns()) . '\']'; |
|
| 248 | + $columns = '[\''.join('\', \'', $index->getColumns()).'\']'; |
|
| 249 | 249 | $source->addString(" ->dropIndex({$columns})"); |
| 250 | 250 | } |
| 251 | 251 | } |
@@ -262,11 +262,11 @@ discard block |
||
| 262 | 262 | ) { |
| 263 | 263 | foreach ($comparator->droppedForeigns() as $foreign) { |
| 264 | 264 | $column = "'{$foreign->getColumn()}'"; |
| 265 | - $table = "'" . substr($foreign->getForeignTable(), strlen($prefix)) . "'"; |
|
| 265 | + $table = "'".substr($foreign->getForeignTable(), strlen($prefix))."'"; |
|
| 266 | 266 | $key = "'{$foreign->getForeignKey()}'"; |
| 267 | 267 | |
| 268 | 268 | $source->addString( |
| 269 | - " ->addForeignKey({$column}, {$table}, {$key}, " . $this->foreignOptions($foreign) . ")" |
|
| 269 | + " ->addForeignKey({$column}, {$table}, {$key}, ".$this->foreignOptions($foreign).")" |
|
| 270 | 270 | ); |
| 271 | 271 | } |
| 272 | 272 | |
@@ -277,11 +277,11 @@ discard block |
||
| 277 | 277 | $foreign = $pair[self::ORIGINAL_STATE]; |
| 278 | 278 | |
| 279 | 279 | $column = "'{$foreign->getColumn()}'"; |
| 280 | - $table = "'" . substr($foreign->getForeignTable(), strlen($prefix)) . "'"; |
|
| 280 | + $table = "'".substr($foreign->getForeignTable(), strlen($prefix))."'"; |
|
| 281 | 281 | $key = "'{$foreign->getForeignKey()}'"; |
| 282 | 282 | |
| 283 | 283 | $source->addString( |
| 284 | - " ->alterForeignKey({$column}, {$table}, {$key}, " . $this->foreignOptions($foreign) . ")" |
|
| 284 | + " ->alterForeignKey({$column}, {$table}, {$key}, ".$this->foreignOptions($foreign).")" |
|
| 285 | 285 | ); |
| 286 | 286 | } |
| 287 | 287 | |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | { |
| 360 | 360 | $lines = explode("\n", $serialized); |
| 361 | 361 | foreach ($lines as &$line) { |
| 362 | - $line = " " . $line; |
|
| 362 | + $line = " ".$line; |
|
| 363 | 363 | unset($line); |
| 364 | 364 | } |
| 365 | 365 | |