| Conditions | 4 |
| Paths | 4 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 28 | public function get(Scope $scope, Config $config): ?Locale |
|
| 23 | { |
||
| 24 | 28 | if(!isset($config['query_key'])) return null; |
|
| 25 | |||
| 26 | 15 | if( ! $queryValue = $this->request->get($config['query_key']) ) return null; |
|
| 27 | |||
| 28 | 3 | return ($scope->validateLocale(Locale::from($queryValue))) ? Locale::from($queryValue) : null; |
|
| 29 | } |
||
| 30 | } |