Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions examples/src/Repositories/ScopeRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ScopeRepository implements ScopeRepositoryInterface
/**
* {@inheritdoc}
*/
public function getScopeEntityByIdentifier($scopeIdentifier): ?ScopeEntityInterface
public function getScopeEntityByIdentifier(string $identifier): ?ScopeEntityInterface
{
$scopes = [
'basic' => [
Expand All @@ -35,12 +35,12 @@ public function getScopeEntityByIdentifier($scopeIdentifier): ?ScopeEntityInterf
],
];

if (array_key_exists($scopeIdentifier, $scopes) === false) {
if (array_key_exists($identifier, $scopes) === false) {
return null;
}

$scope = new ScopeEntity();
$scope->setIdentifier($scopeIdentifier);
$scope->setIdentifier($identifier);

return $scope;
}
Expand All @@ -55,7 +55,7 @@ public function finalizeScopes(
$userIdentifier = null,
$authCodeId = null
): array {
// Example of programatically modifying the final scope of the access token
// Example of programmatically modifying the final scope of the access token
if ((int) $userIdentifier === 1) {
$scope = new ScopeEntity();
$scope->setIdentifier('email');
Expand Down