Skip to content

Commit

Permalink
fix: phpstan errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lotyp committed May 18, 2023
1 parent 8c7ed1e commit 7bf270a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
9 changes: 2 additions & 7 deletions app/config/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,9 @@
*/
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => \Domain\User\Models\User::class,
'driver' => 'database',
'table' => 'users',
],

// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],

/*
Expand Down
6 changes: 3 additions & 3 deletions app/config/cycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
connection: new Config\Postgres\TcpConnectionConfig(
database: env('DB_DATABASE', 'wod'),
host: env('DB_HOST', '127.0.0.1'),
port: (int) env('DB_PORT', 5432),
port: env('DB_PORT', 5432),
user: env('DB_USERNAME', 'wod'),
password: env('DB_PASSWORD', '')
),
Expand All @@ -112,7 +112,7 @@
connection: new Config\MySQL\TcpConnectionConfig(
database: env('DB_DATABASE', 'wod'),
host: env('DB_HOST', '127.0.0.1'),
port: (int) env('DB_PORT', 3306),
port: env('DB_PORT', 3306),
user: env('DB_USERNAME', 'wod'),
password: env('DB_PASSWORD', '')
),
Expand All @@ -126,7 +126,7 @@
connection: new Config\SQLServer\TcpConnectionConfig(
database: env('DB_DATABASE', 'wod'),
host: env('DB_HOST', '127.0.0.1'),
port: (int) env('DB_PORT', 1433),
port: env('DB_PORT', 1433),
user: env('DB_USERNAME', 'wod'),
password: env('DB_PASSWORD', '')
),
Expand Down
2 changes: 1 addition & 1 deletion app/src/Bridge/Laravel/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class RouteServiceProvider extends ServiceProvider
public function boot(): void
{
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
return Limit::perMinute(60)->by($request->user()?->incrementalId ?: $request->ip());
});

$this->routes(function (): void {
Expand Down
7 changes: 6 additions & 1 deletion app/src/Domain/User/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ public function __construct(
$this->roles = new Collection();
}

public function getName(): string
public function incrementalId(): ?int
{
return $this->incrementalId;
}

public function name(): string
{
return $this->name;
}
Expand Down

0 comments on commit 7bf270a

Please sign in to comment.