Skip to content

Commit 2111ea1

Browse files
Larastan Level 9 II
Mostly making variables so that they can be typed to prevent phpstan errors.
1 parent 6349dcf commit 2111ea1

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.github/workflows/tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- master
7-
- laravel-10-compatibility
87
pull_request:
98

109
jobs:

phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ parameters:
1010
checkGenericClassInNonGenericObjectType: false
1111

1212
# Level 9 is the highest level
13-
level: 8
13+
level: 9
1414

src/PostgresEngineServiceProvider.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,14 @@ public static function builderMacros(): array
3131
public function boot(): void
3232
{
3333
$this->app->make(EngineManager::class)->extend('pgsql', function () {
34-
return new PostgresEngine(
35-
$this->app->get('db'),
36-
$this->app->get('config')->get('scout.pgsql', [])
37-
);
34+
/** @var \Illuminate\Database\ConnectionResolverInterface $db */
35+
$db = $this->app->get('db');
36+
/** @var \Illuminate\Support\Facades\Config $config */
37+
$config = $this->app->get('config');
38+
/** @var array<string, mixed> $pgScoutConfig */
39+
$pgScoutConfig = $config->get('scout.pgsql', []);
40+
41+
return new PostgresEngine($db, $pgScoutConfig);
3842
});
3943

4044
foreach (self::builderMacros() as $macro => $class) {

0 commit comments

Comments
 (0)