From 99fc1e3f87dac1e53b0b123d73bee5d38535807b Mon Sep 17 00:00:00 2001 From: lukinovec Date: Wed, 10 May 2023 12:47:51 +0200 Subject: [PATCH] Add return types to relationship methods --- tests/PostgresTest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/PostgresTest.php b/tests/PostgresTest.php index 5f7d1aa3..e897bdb4 100644 --- a/tests/PostgresTest.php +++ b/tests/PostgresTest.php @@ -8,6 +8,7 @@ use Stancl\Tenancy\Tests\Etc\Tenant; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Schema; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\HasMany; use Stancl\Tenancy\Events\TenancyEnded; use Illuminate\Database\Schema\Blueprint; use Stancl\Tenancy\Events\TenancyInitialized; @@ -177,7 +178,7 @@ test('queries are correctly scoped using RLS', function() { expect(UuidScopedComment::all()->pluck('text'))->toContain($post2Comment->text)->not()->toContain($post1Comment->text); tenancy()->end(); -})->group('test'); +}); trait UsesUuidAsPrimaryKey { @@ -205,12 +206,12 @@ class UuidPost extends Model protected $guarded = []; protected $keyType = 'string'; - public function uuid_comments() + public function uuid_comments(): HasMany { return $this->hasMany(UuidComment::class); } - public function uuid_scoped_comments() + public function uuid_scoped_comments(): HasMany { return $this->hasMany(UuidComment::class); }