From 26eafd30ba4e643c769a109f010ff68a1daf0f97 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Mon, 13 Feb 2023 15:42:46 +0100 Subject: [PATCH] Fix PHPStan error --- src/Commands/CreateRLSPoliciesForTenantTables.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Commands/CreateRLSPoliciesForTenantTables.php b/src/Commands/CreateRLSPoliciesForTenantTables.php index 0c37ba9f..204c704c 100644 --- a/src/Commands/CreateRLSPoliciesForTenantTables.php +++ b/src/Commands/CreateRLSPoliciesForTenantTables.php @@ -29,7 +29,10 @@ class CreateRLSPoliciesForTenantTables extends Command protected function getTenantTables(): array { return array_map(function (SplFileInfo $migration) { - return str($migration)->after('create_')->before('_table')->toString(); + return str($migration->getFilename()) + ->after('create_') + ->before('_table') + ->toString(); }, File::files('./database/migrations/tenant')); } }