| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 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 | } |
||
| 68 |