@@ -156,7 +156,7 @@ |
||
| 156 | 156 | |
| 157 | 157 | foreach ($context as $key => $value) { |
| 158 | 158 | if ($key === 'exception' && $value instanceof Throwable) { |
| 159 | - $value = $value->getMessage() . ' ' . $this->cleanFileNames($value->getFile()) . ':' . $value->getLine(); |
|
| 159 | + $value = $value->getMessage().' '.$this->cleanFileNames($value->getFile()).':'.$value->getLine(); |
|
| 160 | 160 | // Todo - sanitize input before writing to file? |
| 161 | 161 | $replace["{{$key}}"] = $value; |
| 162 | 162 | } elseif (null === $value || is_scalar($value) || (is_object($value) && method_exists($value, '__toString'))) { |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public function register() |
| 42 | 42 | { |
| 43 | - $this->app->singleton('encrypter', function ($app) { |
|
| 43 | + $this->app->singleton('encrypter', function($app) { |
|
| 44 | 44 | |
| 45 | 45 | $config = $app->make('config')->get('security'); |
| 46 | 46 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | protected function key(array $config) |
| 66 | 66 | { |
| 67 | - return take($config['key'], function ($key) { |
|
| 67 | + return take($config['key'], function($key) { |
|
| 68 | 68 | if (empty($key)) { |
| 69 | 69 | throw new RuntimeException('No application encryption key has been specified.'); |
| 70 | 70 | } |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | if (static::supported($key, $cipher)) { |
| 68 | 68 | $this->key = $key; |
| 69 | 69 | $this->cipher = $cipher; |
| 70 | - } else { |
|
| 70 | + } else { |
|
| 71 | 71 | throw new RuntimeException('The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.'); |
| 72 | 72 | } |
| 73 | 73 | |
@@ -198,15 +198,15 @@ discard block |
||
| 198 | 198 | */ |
| 199 | 199 | protected function compileWheres(Builder $builder) |
| 200 | 200 | { |
| 201 | - if (is_null($builder->wheres)) { |
|
| 202 | - return ''; |
|
| 203 | - } |
|
| 201 | + if (is_null($builder->wheres)) { |
|
| 202 | + return ''; |
|
| 203 | + } |
|
| 204 | 204 | |
| 205 | - if (count($sql = $this->compileWheresToArray($builder)) > 0) { |
|
| 205 | + if (count($sql = $this->compileWheresToArray($builder)) > 0) { |
|
| 206 | 206 | return $this->concatenateWheresClauses($builder, $sql); |
| 207 | - } |
|
| 207 | + } |
|
| 208 | 208 | |
| 209 | - return ''; |
|
| 209 | + return ''; |
|
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | /** |
@@ -913,7 +913,7 @@ discard block |
||
| 913 | 913 | */ |
| 914 | 914 | public function compileUpdateWithoutJoins(Builder $builder, $table, $columns, $where) |
| 915 | 915 | { |
| 916 | - return "update {$table} set {$columns} {$where}"; |
|
| 916 | + return "update {$table} set {$columns} {$where}"; |
|
| 917 | 917 | } |
| 918 | 918 | |
| 919 | 919 | /** |
@@ -966,7 +966,7 @@ discard block |
||
| 966 | 966 | */ |
| 967 | 967 | public function compileDeleteWithoutJoins(Builder $builder, $table, $where) |
| 968 | 968 | { |
| 969 | - return "delete from {$table} {$where}"; |
|
| 969 | + return "delete from {$table} {$where}"; |
|
| 970 | 970 | } |
| 971 | 971 | |
| 972 | 972 | /** |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | |
| 157 | 157 | $clauses = []; |
| 158 | 158 | |
| 159 | - foreach ($join->clauses as $clause) { |
|
| 159 | + foreach ($join->clauses as $clause) { |
|
| 160 | 160 | $clauses[] = $this->compileJoinContraint($clause); |
| 161 | 161 | } |
| 162 | 162 | |
@@ -671,7 +671,7 @@ discard block |
||
| 671 | 671 | */ |
| 672 | 672 | protected function compileOrderToArray(Builder $builder, $orders) |
| 673 | 673 | { |
| 674 | - return array_map(function ($order) { |
|
| 674 | + return array_map(function($order) { |
|
| 675 | 675 | return $order['sql'] ?? $this->wrap($order['column']).' '.$order['direction']; |
| 676 | 676 | }, $orders); |
| 677 | 677 | } |
@@ -1003,7 +1003,7 @@ discard block |
||
| 1003 | 1003 | */ |
| 1004 | 1004 | protected function concatenate($segments) |
| 1005 | 1005 | { |
| 1006 | - return implode(' ', array_filter($segments, function ($value) { |
|
| 1006 | + return implode(' ', array_filter($segments, function($value) { |
|
| 1007 | 1007 | return (string) $value !== ''; |
| 1008 | 1008 | })); |
| 1009 | 1009 | } |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | { |
| 316 | 316 | $this->addSelect(new Expression($expression)); |
| 317 | 317 | |
| 318 | - if (! empty($bindings)) { |
|
| 318 | + if ( ! empty($bindings)) { |
|
| 319 | 319 | $this->addBinding($bindings, 'select'); |
| 320 | 320 | } |
| 321 | 321 | |
@@ -425,7 +425,7 @@ discard block |
||
| 425 | 425 | */ |
| 426 | 426 | protected function addArrayWheres($column, $boolean, $method = 'where') |
| 427 | 427 | { |
| 428 | - return $this->whereNested(function ($query) use ($column, $method, $boolean) { |
|
| 428 | + return $this->whereNested(function($query) use ($column, $method, $boolean) { |
|
| 429 | 429 | foreach ($column as $key => $value) { |
| 430 | 430 | if (is_numeric($key) && is_array($value)) { |
| 431 | 431 | $query->{$method}(...array_values($value)); |
@@ -750,7 +750,7 @@ discard block |
||
| 750 | 750 | */ |
| 751 | 751 | public function get($columns = ['*']) |
| 752 | 752 | { |
| 753 | - return collect($this->getFresh(Arr::wrap($columns), function () { |
|
| 753 | + return collect($this->getFresh(Arr::wrap($columns), function() { |
|
| 754 | 754 | return $this->getWithStatement(); |
| 755 | 755 | })); |
| 756 | 756 | } |
@@ -880,7 +880,7 @@ discard block |
||
| 880 | 880 | |
| 881 | 881 | $this->columns = $previous; |
| 882 | 882 | |
| 883 | - if (isset($results[0])) { |
|
| 883 | + if (isset($results[0])) { |
|
| 884 | 884 | $result = array_change_key((array) $results[0]); |
| 885 | 885 | } |
| 886 | 886 | |
@@ -1188,7 +1188,7 @@ discard block |
||
| 1188 | 1188 | */ |
| 1189 | 1189 | public function cleanBindings(array $bindings) |
| 1190 | 1190 | { |
| 1191 | - return array_values(array_filter($bindings, function ($binding) { |
|
| 1191 | + return array_values(array_filter($bindings, function($binding) { |
|
| 1192 | 1192 | return ! $binding instanceof Expression; |
| 1193 | 1193 | })); |
| 1194 | 1194 | } |
@@ -176,7 +176,7 @@ |
||
| 176 | 176 | $connection->setEventDispatcher($this->app['events']); |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | - $connection->setReconnector(function ($connection) { |
|
| 179 | + $connection->setReconnector(function($connection) { |
|
| 180 | 180 | $this->reconnect($connection->getName()); |
| 181 | 181 | }); |
| 182 | 182 | |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | */ |
| 260 | 260 | public function select($query, $bindings = [], $useReadPdo = true) |
| 261 | 261 | { |
| 262 | - return $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) { |
|
| 262 | + return $this->run($query, $bindings, function($query, $bindings) use ($useReadPdo) { |
|
| 263 | 263 | |
| 264 | 264 | if ($this->pretending()) { |
| 265 | 265 | return []; |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | */ |
| 327 | 327 | public function statement($query, $bindings = []) |
| 328 | 328 | { |
| 329 | - return $this->run($query, $bindings, function ($query, $bindings) { |
|
| 329 | + return $this->run($query, $bindings, function($query, $bindings) { |
|
| 330 | 330 | if ($this->pretending()) { |
| 331 | 331 | return true; |
| 332 | 332 | } |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | */ |
| 351 | 351 | public function affectingStatement($query, $bindings = []) |
| 352 | 352 | { |
| 353 | - return $this->run($query, $bindings, function ($query, $bindings) { |
|
| 353 | + return $this->run($query, $bindings, function($query, $bindings) { |
|
| 354 | 354 | |
| 355 | 355 | if ($this->pretending()) |
| 356 | 356 | { |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | */ |
| 380 | 380 | public function prepend(Closure $callback) |
| 381 | 381 | { |
| 382 | - return $this->withFreshQueryLog(function () use ($callback) { |
|
| 382 | + return $this->withFreshQueryLog(function() use ($callback) { |
|
| 383 | 383 | |
| 384 | 384 | $this->pretending = true; |
| 385 | 385 | |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | return; |
| 589 | 589 | } |
| 590 | 590 | |
| 591 | - switch($event) |
|
| 591 | + switch ($event) |
|
| 592 | 592 | { |
| 593 | 593 | case 'beginTransaction': |
| 594 | 594 | return $this->events->dispatch(new TransactionBegin($this)); |