From d4025fb8865c54863180efea9ae0a5267ec994c0 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Mon, 13 Feb 2023 15:36:23 +0100 Subject: [PATCH] Fix PHPStan error --- src/Commands/CreateRLSPoliciesForTenantTables.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Commands/CreateRLSPoliciesForTenantTables.php b/src/Commands/CreateRLSPoliciesForTenantTables.php index 4d5898ce..0c37ba9f 100644 --- a/src/Commands/CreateRLSPoliciesForTenantTables.php +++ b/src/Commands/CreateRLSPoliciesForTenantTables.php @@ -7,6 +7,7 @@ namespace Stancl\Tenancy\Commands; use Illuminate\Console\Command; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\File; +use Symfony\Component\Finder\SplFileInfo; class CreateRLSPoliciesForTenantTables extends Command { @@ -27,7 +28,7 @@ class CreateRLSPoliciesForTenantTables extends Command protected function getTenantTables(): array { - return array_map(function (string $migration) { + return array_map(function (SplFileInfo $migration) { return str($migration)->after('create_')->before('_table')->toString(); }, File::files('./database/migrations/tenant')); }