From e6506a8658ad14839044e3f3d56a7177ce2b2323 Mon Sep 17 00:00:00 2001 From: Sourcefli Date: Tue, 9 Feb 2021 22:05:37 -0800 Subject: [PATCH] normalize scope string when its being passed in as a parameter --- src/Adapters/AllPermissionsAdapter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Adapters/AllPermissionsAdapter.php b/src/Adapters/AllPermissionsAdapter.php index 7348ad8..6396973 100644 --- a/src/Adapters/AllPermissionsAdapter.php +++ b/src/Adapters/AllPermissionsAdapter.php @@ -15,11 +15,11 @@ public function setScope(string $scopeType): AllPermissionsAdapter $scope = Str::of($scopeType); if (!$scope->startsWith('[')) { - $scope->prepend('['); + $scope = $scope->prepend('['); } if (!$scope->endsWith(']')) { - $scope->append(']'); + $scope = $scope->append(']'); } $this->validateScope((string) $scope);