| Total Complexity | 4 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | class RequestMapper extends RestRequestMapper |
||
| 27 | { |
||
| 28 | /** |
||
| 29 | * @var array<int, string> |
||
| 30 | */ |
||
| 31 | protected static array $properties = [ |
||
| 32 | 'username', |
||
| 33 | 'firstName', |
||
| 34 | 'lastName', |
||
| 35 | 'email', |
||
| 36 | 'language', |
||
| 37 | 'locale', |
||
| 38 | 'timezone', |
||
| 39 | 'userGroups', |
||
| 40 | 88 | 'password', |
|
| 41 | ]; |
||
| 42 | |||
| 43 | public function __construct( |
||
| 44 | private UserGroupResource $userGroupResource, |
||
| 45 | ) { |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param array<int, string> $userGroups |
||
| 50 | * |
||
| 51 | * @return array<int, UserGroup> |
||
| 52 | 4 | * |
|
| 53 | * @throws Throwable |
||
| 54 | 4 | */ |
|
| 55 | 4 | protected function transformUserGroups(array $userGroups): array |
|
| 56 | { |
||
| 57 | return array_map( |
||
| 58 | fn (string $userGroupUuid): UserGroup => $this->userGroupResource->getReference($userGroupUuid), |
||
| 59 | $userGroups, |
||
| 60 | ); |
||
| 61 | } |
||
| 62 | |||
| 63 | protected function transformLanguage(string $language): Language |
||
| 64 | { |
||
| 65 | return Language::tryFrom($language) ?? throw new InvalidArgumentException('Invalid language'); |
||
| 66 | } |
||
| 67 | |||
| 68 | protected function transformLocale(string $locale): Locale |
||
| 71 | } |
||
| 72 | } |
||
| 73 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths