Completed
Push — master ( 744a89...49847d )
by
unknown
15:21
created
Controller/UsersController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
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 */
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             'hydration' => array(
95 95
                 'groups' => array(
96 96
                     'main-form' => ['id', 'username', 'email', 'firstName', 'lastName', 'middleName', 'meta'],
97
-                    'list' => function (User $user) {
97
+                    'list' => function(User $user) {
98 98
                         $groups = array();
99 99
                         foreach ($user->getGroups() as $group) {
100 100
                             $groups[] = $group->getName();
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
                             'meta' => $user->getMeta(),
114 114
                         );
115 115
                     },
116
-                    'compact-list' => function (User $user) {
116
+                    'compact-list' => function(User $user) {
117 117
                         $groups = array();
118 118
                         foreach ($user->getGroups() as $group) {
119 119
                             $groups[] = $group->getName();
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                     'modera-backend-security-group-groupusers' => HydrationProfile::create(false)->useGroups(array('compact-list')),
138 138
                 ),
139 139
             ),
140
-            'map_data_on_create' => function (array $params, User $user, DataMapperInterface $defaultMapper, ContainerInterface $container) use ($self) {
140
+            'map_data_on_create' => function(array $params, User $user, DataMapperInterface $defaultMapper, ContainerInterface $container) use ($self) {
141 141
                 $defaultMapper->mapData($params, $user);
142 142
 
143 143
                 if (isset($params['plainPassword']) && $params['plainPassword']) {
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
                     throw new BadPasswordException($e->getErrors()[0], null, $e);
157 157
                 }
158 158
             },
159
-            'map_data_on_update' => function (array $params, User $user, DataMapperInterface $defaultMapper, ContainerInterface $container) use ($self) {
159
+            'map_data_on_update' => function(array $params, User $user, DataMapperInterface $defaultMapper, ContainerInterface $container) use ($self) {
160 160
                 $defaultMapper->mapData($params, $user);
161 161
 
162 162
                 /* @var LoggerInterface $activityMgr */
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
                     $activityMgr->info($activityMsg, $activityContext);
200 200
                 }
201 201
             },
202
-            'updated_entity_validator' => function (array $params, User $user, EntityValidatorInterface $validator, array $config, ContainerInterface $container) {
202
+            'updated_entity_validator' => function(array $params, User $user, EntityValidatorInterface $validator, array $config, ContainerInterface $container) {
203 203
                 $isBatchUpdatedBeingPerformed = !isset($params['record']);
204 204
                 if ($isBatchUpdatedBeingPerformed) {
205 205
                     // Because of bug in AbstractCrudController (see MF-UPGRADE3.0 and search for "$recordParams" keyword)
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 
261 261
                 return $result;
262 262
             },
263
-            'remove_entities_handler' => function ($entities, $params, $defaultHandler, ContainerInterface $container) {
263
+            'remove_entities_handler' => function($entities, $params, $defaultHandler, ContainerInterface $container) {
264 264
                 /* @var UserService $userService */
265 265
                 $userService = $container->get('modera_security.service.user_service');
266 266
 
Please login to merge, or discard this patch.