Skip to content

Commit 7bf270a

Browse files
committed
fix: phpstan errors
1 parent 8c7ed1e commit 7bf270a

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

app/config/auth.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,9 @@
5252
*/
5353
'providers' => [
5454
'users' => [
55-
'driver' => 'eloquent',
56-
'model' => \Domain\User\Models\User::class,
55+
'driver' => 'database',
56+
'table' => 'users',
5757
],
58-
59-
// 'users' => [
60-
// 'driver' => 'database',
61-
// 'table' => 'users',
62-
// ],
6358
],
6459

6560
/*

app/config/cycle.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
connection: new Config\Postgres\TcpConnectionConfig(
9898
database: env('DB_DATABASE', 'wod'),
9999
host: env('DB_HOST', '127.0.0.1'),
100-
port: (int) env('DB_PORT', 5432),
100+
port: env('DB_PORT', 5432),
101101
user: env('DB_USERNAME', 'wod'),
102102
password: env('DB_PASSWORD', '')
103103
),
@@ -112,7 +112,7 @@
112112
connection: new Config\MySQL\TcpConnectionConfig(
113113
database: env('DB_DATABASE', 'wod'),
114114
host: env('DB_HOST', '127.0.0.1'),
115-
port: (int) env('DB_PORT', 3306),
115+
port: env('DB_PORT', 3306),
116116
user: env('DB_USERNAME', 'wod'),
117117
password: env('DB_PASSWORD', '')
118118
),
@@ -126,7 +126,7 @@
126126
connection: new Config\SQLServer\TcpConnectionConfig(
127127
database: env('DB_DATABASE', 'wod'),
128128
host: env('DB_HOST', '127.0.0.1'),
129-
port: (int) env('DB_PORT', 1433),
129+
port: env('DB_PORT', 1433),
130130
user: env('DB_USERNAME', 'wod'),
131131
password: env('DB_PASSWORD', '')
132132
),

app/src/Bridge/Laravel/Providers/RouteServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class RouteServiceProvider extends ServiceProvider
2727
public function boot(): void
2828
{
2929
RateLimiter::for('api', function (Request $request) {
30-
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
30+
return Limit::perMinute(60)->by($request->user()?->incrementalId ?: $request->ip());
3131
});
3232

3333
$this->routes(function (): void {

app/src/Domain/User/User.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ public function __construct(
3838
$this->roles = new Collection();
3939
}
4040

41-
public function getName(): string
41+
public function incrementalId(): ?int
42+
{
43+
return $this->incrementalId;
44+
}
45+
46+
public function name(): string
4247
{
4348
return $this->name;
4449
}

0 commit comments

Comments
 (0)