Completed
Push — master ( 5445fb...8acc51 )
by
unknown
24s
created
Contributions/ConfigMergersProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             ),
49 49
         ));
50 50
 
51
-        foreach($this->sectionsProvider->getItems() as $section) {
51
+        foreach ($this->sectionsProvider->getItems() as $section) {
52 52
             if ($section instanceof SectionInterface) {
53 53
                 $currentConfig['modera_backend_security']['sections'][] = array(
54 54
                     'sectionConfig' => array(
Please login to merge, or discard this patch.
Controller/PermissionsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             ),
37 37
             'hydration' => array(
38 38
                 'groups' => array(
39
-                    'list' => function (Permission $permission) {
39
+                    'list' => function(Permission $permission) {
40 40
                         $users = array();
41 41
                         foreach ($permission->getUsers() as $user) {
42 42
                             $users[] = $user->getId();
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                     'list',
64 64
                 ),
65 65
             ),
66
-            'map_data_on_update' => function (array $params, Permission $permission, DataMapperInterface $defaultMapper, ContainerInterface $container) {
66
+            'map_data_on_update' => function(array $params, Permission $permission, DataMapperInterface $defaultMapper, ContainerInterface $container) {
67 67
                 $allowedFieldsToEdit = array('users', 'groups');
68 68
                 $params = \array_intersect_key($params, \array_flip($allowedFieldsToEdit));
69 69
                 $defaultMapper->mapData($params, $permission);
Please login to merge, or discard this patch.
Controller/UsersController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
                 'actions' => array(
37 37
                     'create' => ModeraBackendSecurityBundle::ROLE_MANAGE_USER_ACCOUNTS,
38 38
                     'remove' => ModeraBackendSecurityBundle::ROLE_MANAGE_USER_ACCOUNTS,
39
-                    'update' => function (AuthorizationCheckerInterface $ac, array $params) {
39
+                    'update' => function(AuthorizationCheckerInterface $ac, array $params) {
40 40
                         if (isset($params['record']) && isset($params['record']['permissions'])) {
41 41
                             if (!$ac->isGranted(ModeraBackendSecurityBundle::ROLE_MANAGE_PERMISSIONS)) {
42 42
                                 return false;
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                             );
59 59
                         }
60 60
                     },
61
-                    'batchUpdate' => function (AuthorizationCheckerInterface $ac, array $params) {
61
+                    'batchUpdate' => function(AuthorizationCheckerInterface $ac, array $params) {
62 62
                         if (isset($params['record']) && isset($params['record']['permissions'])) {
63 63
                             if (!$ac->isGranted(ModeraBackendSecurityBundle::ROLE_MANAGE_PERMISSIONS)) {
64 64
                                 return false;
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             ),
107 107
             'hydration' => array(
108 108
                 'groups' => array(
109
-                    'main-form' => function (User $user) {
109
+                    'main-form' => function(User $user) {
110 110
                         $meta = array();
111 111
                         if (
112 112
                             $this->isGranted(ModeraBackendSecurityBundle::ROLE_MANAGE_USER_PROFILES) ||
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
                             'meta' => $meta,
127 127
                         );
128 128
                     },
129
-                    'list' => function (User $user) {
129
+                    'list' => function(User $user) {
130 130
                         $groups = array();
131 131
                         foreach ($user->getGroups() as $group) {
132 132
                             $groups[] = $group->getName();
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
                             'meta' => $meta,
162 162
                         );
163 163
                     },
164
-                    'compact-list' => function (User $user) {
164
+                    'compact-list' => function(User $user) {
165 165
                         $groups = array();
166 166
                         foreach ($user->getGroups() as $group) {
167 167
                             $groups[] = $group->getId();
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
                     'modera-backend-security-group-groupusers' => HydrationProfile::create(false)->useGroups(array('compact-list')),
193 193
                 ),
194 194
             ),
195
-            'map_data_on_create' => function (array $params, User $user, DataMapperInterface $defaultMapper, ContainerInterface $container) {
195
+            'map_data_on_create' => function(array $params, User $user, DataMapperInterface $defaultMapper, ContainerInterface $container) {
196 196
                 $defaultMapper->mapData($params, $user);
197 197
 
198 198
                 if (isset($params['plainPassword']) && $params['plainPassword']) {
@@ -211,13 +211,13 @@  discard block
 block discarded – undo
211 211
                     throw new BadPasswordException($e->getErrors()[0], null, $e);
212 212
                 }
213 213
             },
214
-            'map_data_on_update' => function (array $params, User $user, DataMapperInterface $defaultMapper, ContainerInterface $container) {
215
-                $ignoreMapping = [ 'active', 'plainPassword', 'sendPassword' ];
214
+            'map_data_on_update' => function(array $params, User $user, DataMapperInterface $defaultMapper, ContainerInterface $container) {
215
+                $ignoreMapping = ['active', 'plainPassword', 'sendPassword'];
216 216
                 $params = \array_intersect_key($params, \array_flip($this->getAllowedFieldsToEdit($user)));
217 217
                 $params = \array_diff_key($params, \array_flip($ignoreMapping));
218 218
                 $defaultMapper->mapData($params, $user);
219 219
             },
220
-            'update_entity_handler' => function (User $user, array $params, PersistenceHandlerInterface $defaultHandler, ContainerInterface $container) {
220
+            'update_entity_handler' => function(User $user, array $params, PersistenceHandlerInterface $defaultHandler, ContainerInterface $container) {
221 221
                 $params = $params['record'];
222 222
 
223 223
                 if (isset($params['active'])) {
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 
257 257
                 return $defaultHandler->update($user);
258 258
             },
259
-            'updated_entity_validator' => function (array $params, User $user, EntityValidatorInterface $validator, array $config, ContainerInterface $container) {
259
+            'updated_entity_validator' => function(array $params, User $user, EntityValidatorInterface $validator, array $config, ContainerInterface $container) {
260 260
                 if (!isset($params['record'])) {
261 261
                     $result = new ValidationResult();
262 262
                     $result->addGeneralError('Bad request.');
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 
297 297
                 return $result;
298 298
             },
299
-            'remove_entities_handler' => function ($entities, $params, $defaultHandler, ContainerInterface $container) {
299
+            'remove_entities_handler' => function($entities, $params, $defaultHandler, ContainerInterface $container) {
300 300
                 $operationResult = new OperationResult();
301 301
 
302 302
                 foreach ($entities as $entity) {
Please login to merge, or discard this patch.
Controller/GroupsController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     {
25 25
         $em = $this->getDoctrine();
26 26
 
27
-        $groupEntityValidator = function (array $params, Group $group, DefaultEntityValidator $defaultValidator, array $config, ContainerInterface $container) use ($em) {
27
+        $groupEntityValidator = function(array $params, Group $group, DefaultEntityValidator $defaultValidator, array $config, ContainerInterface $container) use ($em) {
28 28
             $validationResult = $defaultValidator->validate($group, $config);
29 29
 
30 30
             if (!$group->getRefName()) {
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             return $validationResult;
52 52
         };
53 53
 
54
-        $mapEntity = function (array $params, Group $group, DataMapperInterface $defaultMapper, ContainerInterface $container) {
54
+        $mapEntity = function(array $params, Group $group, DataMapperInterface $defaultMapper, ContainerInterface $container) {
55 55
             $allowedFieldsToEdit = array('name', 'refName', 'permissions');
56 56
             $params = \array_intersect_key($params, \array_flip($allowedFieldsToEdit));
57 57
             $defaultMapper->mapData($params, $group);
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             ),
87 87
             'hydration' => array(
88 88
                 'groups' => array(
89
-                    'list' => function (Group $group) {
89
+                    'list' => function(Group $group) {
90 90
                         return array(
91 91
                             'id' => $group->getId(),
92 92
                             'name' => $group->getName(),
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
                     'edit-group' => array('main-form'),
104 104
                 ),
105 105
             ),
106
-            'format_new_entity_values' => function (array $params, array $config, NewValuesFactoryInterface $defaultImpl, ContainerInterface $container) {
106
+            'format_new_entity_values' => function(array $params, array $config, NewValuesFactoryInterface $defaultImpl, ContainerInterface $container) {
107 107
                 return array(
108 108
                     'refName' => null,
109 109
                 );
Please login to merge, or discard this patch.