Skip to content

Commit 9d4de88

Browse files
author
Admin
committed
PSR 12 for serializable-closure and prompts and illuminate
1 parent c65be4c commit 9d4de88

33 files changed

+146
-137
lines changed

illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ public function resolveAuthenticatedUser($request)
5555
$decodedString = "{$request->socket_id}::user::{$encodedUser}";
5656

5757
$auth = $settings['auth_key'] . ':' . hash_hmac(
58-
'sha256',
59-
$decodedString,
60-
$settings['secret']
61-
);
58+
'sha256',
59+
$decodedString,
60+
$settings['secret']
61+
);
6262

6363
return [
6464
'auth' => $auth,
@@ -122,17 +122,17 @@ public function validAuthenticationResponse($request, $result)
122122
$request,
123123
method_exists($this->pusher, 'authorizePresenceChannel')
124124
? $this->pusher->authorizePresenceChannel(
125-
$request->channel_name,
126-
$request->socket_id,
127-
$broadcastIdentifier,
128-
$result
129-
)
125+
$request->channel_name,
126+
$request->socket_id,
127+
$broadcastIdentifier,
128+
$result
129+
)
130130
: $this->pusher->presence_auth(
131-
$request->channel_name,
132-
$request->socket_id,
133-
$broadcastIdentifier,
134-
$result
135-
)
131+
$request->channel_name,
132+
$request->socket_id,
133+
$broadcastIdentifier,
134+
$result
135+
)
136136
);
137137
}
138138

illuminate/Console/Scheduling/Event.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ protected function pingCallback($url)
645645
return function (Container $container, HttpClient $http) use ($url) {
646646
try {
647647
$http->request('GET', $url);
648-
} catch (ClientExceptionInterface|TransferException $e) {
648+
} catch (ClientExceptionInterface | TransferException $e) {
649649
$container->make(ExceptionHandler::class)->report($e);
650650
}
651651
};

illuminate/Database/Connectors/SqlServerConnector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ protected function getSqlSrvDsn(array $config)
200200
*/
201201
protected function buildConnectString($driver, array $arguments)
202202
{
203-
return $driver . ':' . implode(';', array_map(function ($key) use ($arguments) {
204-
return sprintf('%s=%s', $key, $arguments[$key]);
205-
}, array_keys($arguments)));
203+
return $driver . ':' . implode(';', array_map(function ($key) use ($arguments): string {
204+
return sprintf('%s=%s', $key, $arguments[$key]);
205+
}, array_keys($arguments)));
206206
}
207207

208208
/**

illuminate/Database/Console/Migrations/MigrateCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,11 @@ protected function createMissingSqliteDatabase($path)
192192
*/
193193
protected function createMissingMysqlDatabase($connection)
194194
{
195-
if ($this->laravel['config']->get(
195+
if (
196+
$this->laravel['config']->get(
196197
"database.connections.{$connection->getName()}.database"
197-
) !== $connection->getDatabaseName()) {
198+
) !== $connection->getDatabaseName()
199+
) {
198200
return false;
199201
}
200202

illuminate/Database/Console/ShowCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ protected function displayForCli(array $data)
172172
($tableSize ? $tableSize : '') . ($this->option(
173173
'counts'
174174
) ? ' <fg=gray;options=bold>/</> <fg=yellow;options=bold>' . number_format(
175-
$table['rows']
176-
) . '</>' : '')
175+
$table['rows']
176+
) . '</>' : '')
177177
);
178178

179179
if ($this->output->isVerbose()) {

illuminate/Database/Eloquent/Model.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,15 @@
2424
use JsonSerializable;
2525
use LogicException;
2626

27-
abstract class Model implements Arrayable, ArrayAccess, CanBeEscapedWhenCastToString, HasBroadcastChannel, Jsonable,
28-
JsonSerializable, QueueableEntity, UrlRoutable
27+
abstract class Model implements
28+
Arrayable,
29+
ArrayAccess,
30+
CanBeEscapedWhenCastToString,
31+
HasBroadcastChannel,
32+
Jsonable,
33+
JsonSerializable,
34+
QueueableEntity,
35+
UrlRoutable
2936
{
3037
use Concerns\HasAttributes;
3138
use Concerns\HasEvents;

illuminate/Database/Query/Grammars/Grammar.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -615,9 +615,9 @@ protected function whereJsonContains(Builder $query, $where)
615615
$not = $where['not'] ? 'not ' : '';
616616

617617
return $not . $this->compileJsonContains(
618-
$where['column'],
619-
$this->parameter($where['value'])
620-
);
618+
$where['column'],
619+
$this->parameter($where['value'])
620+
);
621621
}
622622

623623
/**
@@ -656,9 +656,7 @@ protected function whereJsonContainsKey(Builder $query, $where)
656656
{
657657
$not = $where['not'] ? 'not ' : '';
658658

659-
return $not . $this->compileJsonContainsKey(
660-
$where['column']
661-
);
659+
return $not . $this->compileJsonContainsKey($where['column']);
662660
}
663661

664662
/**
@@ -761,10 +759,10 @@ protected function compileGroups(Builder $query, $groups)
761759
protected function compileHavings(Builder $query)
762760
{
763761
return 'having ' . $this->removeLeadingBoolean(
764-
collect($query->havings)->map(function ($having) {
765-
return $having['boolean'] . ' ' . $this->compileHaving($having);
766-
})->implode(' ')
767-
);
762+
collect($query->havings)->map(function (array $having): string {
763+
return $having['boolean'] . ' ' . $this->compileHaving($having);
764+
})->implode(' ')
765+
);
768766
}
769767

770768
/**

illuminate/Database/Query/Grammars/SQLiteGrammar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ protected function compileJsonContains($column, $value)
169169
[$field, $path] = $this->wrapJsonFieldAndPath($column);
170170

171171
return 'exists (select 1 from json_each(' . $field . $path . ') where ' . $this->wrap(
172-
'json_each.value'
173-
) . ' is ' . $value . ')';
172+
'json_each.value'
173+
) . ' is ' . $value . ')';
174174
}
175175

176176
/**

illuminate/Database/Schema/Grammars/SqlServerGrammar.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,9 +445,9 @@ public function compileDropColumn(Blueprint $blueprint, Fluent $command)
445445
$dropExistingConstraintsSql = $this->compileDropDefaultConstraint($blueprint, $command) . ';';
446446

447447
return $dropExistingConstraintsSql . 'alter table ' . $this->wrapTable($blueprint) . ' drop column ' . implode(
448-
', ',
449-
$columns
450-
);
448+
', ',
449+
$columns
450+
);
451451
}
452452

453453
/**

illuminate/Foundation/Console/AboutCommand.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,8 @@ protected function gatherApplicationInformation()
198198
return value(
199199
static::format(
200200
value: $logChannel,
201-
console: fn($value
202-
) => '<fg=yellow;options=bold>' . $value . '</> <fg=gray;options=bold>/</> ' . $secondary->implode(
203-
', '
204-
),
201+
console: fn($value): string => '<fg=yellow;options=bold>' . $value .
202+
'</> <fg=gray;options=bold>/</> ' . $secondary->implode(', '),
205203
json: fn() => $secondary->all(),
206204
),
207205
$json

0 commit comments

Comments
 (0)