Skip to content

Commit

Permalink
[11.x] Add Laravel Pint (#53835)
Browse files Browse the repository at this point in the history
* install Pint with custom configuration

- use an empty preset
- set 1 explicit rule
- ignore `/tests` (for now)

* run Pint

this rule ensures all chained methods on a new line are indented exactly once.

this avoids arbitrarily aligning with some character or pattern in the first line line, while still giving us the readability of aligned subsequent lines.

---------

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
browner12 and taylorotwell authored Jan 22, 2025
1 parent bb4d6f6 commit 4ca3ea4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DatabaseUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ public function retrieveByToken($identifier, #[\SensitiveParameter] $token)
public function updateRememberToken(UserContract $user, #[\SensitiveParameter] $token)
{
$this->connection->table($this->table)
->where($user->getAuthIdentifierName(), $user->getAuthIdentifier())
->update([$user->getRememberTokenName() => $token]);
->where($user->getAuthIdentifierName(), $user->getAuthIdentifier())
->update([$user->getRememberTokenName() => $token]);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions EloquentUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public function retrieveById($identifier)
$model = $this->createModel();

return $this->newModelQuery($model)
->where($model->getAuthIdentifierName(), $identifier)
->first();
->where($model->getAuthIdentifierName(), $identifier)
->first();
}

/**
Expand Down

0 comments on commit 4ca3ea4

Please sign in to comment.