@@ -29,7 +29,7 @@ |
||
29 | 29 | ), |
30 | 30 | 'hydration' => array( |
31 | 31 | 'groups' => array( |
32 | - 'list' => function (Permission $permission) { |
|
32 | + 'list' => function(Permission $permission) { |
|
33 | 33 | $groups = array(); |
34 | 34 | foreach ($permission->getGroups() as $group) { |
35 | 35 | $groups[] = $group->getId(); |
@@ -293,7 +293,7 @@ |
||
293 | 293 | } |
294 | 294 | |
295 | 295 | /** |
296 | - * @return array |
|
296 | + * @return string[] |
|
297 | 297 | */ |
298 | 298 | private static function getTablesClasses() |
299 | 299 | { |
@@ -293,7 +293,7 @@ |
||
293 | 293 | } |
294 | 294 | |
295 | 295 | /** |
296 | - * @return array |
|
296 | + * @return string[] |
|
297 | 297 | */ |
298 | 298 | private static function getTablesClasses() |
299 | 299 | { |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | return array_filter( |
30 | 30 | parent::getAllowedFields($entityClass), |
31 | - function ($fieldName) use ($me) { |
|
31 | + function($fieldName) use ($me) { |
|
32 | 32 | if (array_search($fieldName, $me->excludedFields) !== false) { |
33 | 33 | return false; |
34 | 34 | } |
@@ -24,7 +24,7 @@ discard block |
||
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 |
||
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 | $defaultMapper->mapData($params, $group); |
56 | 56 | |
57 | 57 | /* |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | ), |
84 | 84 | 'hydration' => array( |
85 | 85 | 'groups' => array( |
86 | - 'list' => function (Group $group) { |
|
86 | + 'list' => function(Group $group) { |
|
87 | 87 | return array( |
88 | 88 | 'id' => $group->getId(), |
89 | 89 | 'name' => $group->getName(), |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | 'edit-group' => array('main-form'), |
101 | 101 | ), |
102 | 102 | ), |
103 | - 'format_new_entity_values' => function (array $params, array $config, NewValuesFactoryInterface $defaultImpl, ContainerInterface $container) { |
|
103 | + 'format_new_entity_values' => function(array $params, array $config, NewValuesFactoryInterface $defaultImpl, ContainerInterface $container) { |
|
104 | 104 | return array( |
105 | 105 | 'refName' => null, |
106 | 106 | ); |
@@ -32,13 +32,13 @@ discard block |
||
32 | 32 | |
33 | 33 | return array( |
34 | 34 | 'entity' => User::clazz(), |
35 | - 'create_default_data_mapper' => function (ContainerInterface $container) { |
|
35 | + 'create_default_data_mapper' => function(ContainerInterface $container) { |
|
36 | 36 | return $this->container->get('modera_backend_security.data_mapper.user_data_mapper'); |
37 | 37 | }, |
38 | 38 | 'security' => array( |
39 | 39 | 'actions' => array( |
40 | 40 | 'create' => ModeraBackendSecurityBundle::ROLE_MANAGE_USER_PROFILES, |
41 | - 'update' => function (AuthorizationCheckerInterface $ac, array $params) use ($self) { |
|
41 | + 'update' => function(AuthorizationCheckerInterface $ac, array $params) use ($self) { |
|
42 | 42 | /* @var TokenStorageInterface $ts */ |
43 | 43 | $ts = $self->get('security.token_storage'); |
44 | 44 | /* @var User $user */ |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | 'hydration' => array( |
61 | 61 | 'groups' => array( |
62 | 62 | 'main-form' => ['id', 'username', 'email', 'firstName', 'lastName', 'middleName', 'meta'], |
63 | - 'list' => function (User $user) { |
|
63 | + 'list' => function(User $user) { |
|
64 | 64 | $groups = array(); |
65 | 65 | foreach ($user->getGroups() as $group) { |
66 | 66 | $groups[] = $group->getName(); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | 'meta' => $user->getMeta(), |
80 | 80 | ); |
81 | 81 | }, |
82 | - 'compact-list' => function (User $user) { |
|
82 | + 'compact-list' => function(User $user) { |
|
83 | 83 | $groups = array(); |
84 | 84 | foreach ($user->getGroups() as $group) { |
85 | 85 | $groups[] = $group->getName(); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | 'modera-backend-security-group-groupusers' => HydrationProfile::create(false)->useGroups(array('compact-list')), |
104 | 104 | ), |
105 | 105 | ), |
106 | - 'map_data_on_create' => function (array $params, User $entity, DataMapperInterface $defaultMapper, ContainerInterface $container) use ($self) { |
|
106 | + 'map_data_on_create' => function(array $params, User $entity, DataMapperInterface $defaultMapper, ContainerInterface $container) use ($self) { |
|
107 | 107 | $defaultMapper->mapData($params, $entity); |
108 | 108 | |
109 | 109 | if (isset($params['plainPassword']) && $params['plainPassword']) { |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $mailService->sendPassword($entity, $plainPassword); |
120 | 120 | } |
121 | 121 | }, |
122 | - 'map_data_on_update' => function (array $params, User $entity, DataMapperInterface $defaultMapper, ContainerInterface $container) use ($self) { |
|
122 | + 'map_data_on_update' => function(array $params, User $entity, DataMapperInterface $defaultMapper, ContainerInterface $container) use ($self) { |
|
123 | 123 | $defaultMapper->mapData($params, $entity); |
124 | 124 | |
125 | 125 | /* @var LoggerInterface $activityMgr */ |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $activityMgr->info($activityMsg, $activityContext); |
170 | 170 | } |
171 | 171 | }, |
172 | - 'remove_entities_handler' => function ($entities, $params, $defaultHandler, ContainerInterface $container) { |
|
172 | + 'remove_entities_handler' => function($entities, $params, $defaultHandler, ContainerInterface $container) { |
|
173 | 173 | /* @var UserService $userService */ |
174 | 174 | $userService = $container->get('modera_security.service.user_service'); |
175 | 175 |