Skip to content

Commit

Permalink
[11.x] consistent multiline constructors (#53566)
Browse files Browse the repository at this point in the history
* consistent multiline constructors

- trailing comma
- closing parenthese on new line

* standardize multiline constructors

- first parameter on new line
- trailing commas
- parenthese on new line
  • Loading branch information
browner12 authored Nov 18, 2024
1 parent 5dae865 commit 0d3b29d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 16 deletions.
7 changes: 4 additions & 3 deletions Access/Gate.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,15 @@ class Gate implements GateContract
* @param callable|null $guessPolicyNamesUsingCallback
* @return void
*/
public function __construct(Container $container,
public function __construct(
Container $container,
callable $userResolver,
array $abilities = [],
array $policies = [],
array $beforeCallbacks = [],
array $afterCallbacks = [],
?callable $guessPolicyNamesUsingCallback = null)
{
?callable $guessPolicyNamesUsingCallback = null,
) {
$this->policies = $policies;
$this->container = $container;
$this->abilities = $abilities;
Expand Down
12 changes: 8 additions & 4 deletions Passwords/DatabaseTokenRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,14 @@ class DatabaseTokenRepository implements TokenRepositoryInterface
* @param int $throttle
* @return void
*/
public function __construct(ConnectionInterface $connection, HasherContract $hasher,
$table, $hashKey, $expires = 60,
$throttle = 60)
{
public function __construct(
ConnectionInterface $connection,
HasherContract $hasher,
$table,
$hashKey,
$expires = 60,
$throttle = 60,
) {
$this->table = $table;
$this->hasher = $hasher;
$this->hashKey = $hashKey;
Expand Down
15 changes: 8 additions & 7 deletions SessionGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,14 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth
* @param bool $rehashOnLogin
* @return void
*/
public function __construct($name,
UserProvider $provider,
Session $session,
?Request $request = null,
?Timebox $timebox = null,
bool $rehashOnLogin = true)
{
public function __construct(
$name,
UserProvider $provider,
Session $session,
?Request $request = null,
?Timebox $timebox = null,
bool $rehashOnLogin = true,
) {
$this->name = $name;
$this->session = $session;
$this->request = $request;
Expand Down
4 changes: 2 additions & 2 deletions TokenGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ public function __construct(
Request $request,
$inputKey = 'api_token',
$storageKey = 'api_token',
$hash = false)
{
$hash = false,
) {
$this->hash = $hash;
$this->request = $request;
$this->provider = $provider;
Expand Down

0 comments on commit 0d3b29d

Please sign in to comment.