| Total Complexity | 4 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | class ScopeRepository implements ScopeRepositoryInterface |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * {@inheritdoc} |
||
| 26 | */ |
||
| 27 | public function getScopeEntityByIdentifier($scopeIdentifier): ?ScopeEntityInterface |
||
| 28 | { |
||
| 29 | $scopes = [ |
||
| 30 | 'basic' => [ |
||
| 31 | 'description' => 'Basic details about you', |
||
| 32 | ], |
||
| 33 | 'email' => [ |
||
| 34 | 'description' => 'Your email address', |
||
| 35 | ], |
||
| 36 | ]; |
||
| 37 | |||
| 38 | if (array_key_exists($scopeIdentifier, $scopes) === false) { |
||
| 39 | return null; |
||
| 40 | } |
||
| 41 | |||
| 42 | $scope = new ScopeEntity(); |
||
| 43 | $scope->setIdentifier($scopeIdentifier); |
||
| 44 | |||
| 45 | return $scope; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * {@inheritdoc} |
||
| 50 | */ |
||
| 51 | public function finalizeScopes( |
||
| 66 | } |
||
| 67 | } |
||
| 68 |