Skip to content

Commit

Permalink
normalize scope string when its being passed in as a parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourcefli committed Feb 10, 2021
1 parent d33a7df commit e6506a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Adapters/AllPermissionsAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e6506a8

Please sign in to comment.