@@ -37,13 +37,13 @@ discard block |
||
37 | 37 | |
38 | 38 | return array( |
39 | 39 | 'entity' => User::clazz(), |
40 | - 'create_default_data_mapper' => function (ContainerInterface $container) { |
|
40 | + 'create_default_data_mapper' => function(ContainerInterface $container) { |
|
41 | 41 | return $this->container->get('modera_backend_security.data_mapper.user_data_mapper'); |
42 | 42 | }, |
43 | 43 | 'security' => array( |
44 | 44 | 'actions' => array( |
45 | 45 | 'create' => ModeraBackendSecurityBundle::ROLE_MANAGE_USER_PROFILES, |
46 | - 'update' => function (AuthorizationCheckerInterface $ac, array $params) use ($self) { |
|
46 | + 'update' => function(AuthorizationCheckerInterface $ac, array $params) use ($self) { |
|
47 | 47 | /* @var TokenStorageInterface $ts */ |
48 | 48 | $ts = $self->get('security.token_storage'); |
49 | 49 | /* @var User $user */ |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | 'hydration' => array( |
92 | 92 | 'groups' => array( |
93 | 93 | 'main-form' => ['id', 'username', 'email', 'firstName', 'lastName', 'middleName', 'meta'], |
94 | - 'list' => function (User $user) { |
|
94 | + 'list' => function(User $user) { |
|
95 | 95 | $groups = array(); |
96 | 96 | foreach ($user->getGroups() as $group) { |
97 | 97 | $groups[] = $group->getName(); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | 'meta' => $user->getMeta(), |
111 | 111 | ); |
112 | 112 | }, |
113 | - 'compact-list' => function (User $user) { |
|
113 | + 'compact-list' => function(User $user) { |
|
114 | 114 | $groups = array(); |
115 | 115 | foreach ($user->getGroups() as $group) { |
116 | 116 | $groups[] = $group->getName(); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | 'modera-backend-security-group-groupusers' => HydrationProfile::create(false)->useGroups(array('compact-list')), |
135 | 135 | ), |
136 | 136 | ), |
137 | - 'map_data_on_create' => function (array $params, User $user, DataMapperInterface $defaultMapper, ContainerInterface $container) use ($self) { |
|
137 | + 'map_data_on_create' => function(array $params, User $user, DataMapperInterface $defaultMapper, ContainerInterface $container) use ($self) { |
|
138 | 138 | $defaultMapper->mapData($params, $user); |
139 | 139 | |
140 | 140 | if (isset($params['plainPassword']) && $params['plainPassword']) { |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | throw new BadPasswordException($e->getErrors()[0], null, $e); |
154 | 154 | } |
155 | 155 | }, |
156 | - 'map_data_on_update' => function (array $params, User $user, DataMapperInterface $defaultMapper, ContainerInterface $container) use ($self) { |
|
156 | + 'map_data_on_update' => function(array $params, User $user, DataMapperInterface $defaultMapper, ContainerInterface $container) use ($self) { |
|
157 | 157 | $defaultMapper->mapData($params, $user); |
158 | 158 | |
159 | 159 | /* @var LoggerInterface $activityMgr */ |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | $activityMgr->info($activityMsg, $activityContext); |
197 | 197 | } |
198 | 198 | }, |
199 | - 'updated_entity_validator' => function (array $params, User $user, EntityValidatorInterface $validator, array $config) { |
|
199 | + 'updated_entity_validator' => function(array $params, User $user, EntityValidatorInterface $validator, array $config) { |
|
200 | 200 | $isBatchUpdatedBeingPerformed = !isset($params['record']); |
201 | 201 | if ($isBatchUpdatedBeingPerformed) { |
202 | 202 | // Because of bug in AbstractCrudController (see MF-UPGRADE3.0 and search for "$recordParams" keyword) |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | |
225 | 225 | return $result; |
226 | 226 | }, |
227 | - 'remove_entities_handler' => function ($entities, $params, $defaultHandler, ContainerInterface $container) { |
|
227 | + 'remove_entities_handler' => function($entities, $params, $defaultHandler, ContainerInterface $container) { |
|
228 | 228 | /* @var UserService $userService */ |
229 | 229 | $userService = $container->get('modera_security.service.user_service'); |
230 | 230 |