Completed
Push — master ( 744a89...49847d )
by
unknown
15:21
created
Controller/PermissionsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
Tests/Functional/Controller/GroupsControllerTest.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -293,7 +293,7 @@
 block discarded – undo
293 293
     }
294 294
 
295 295
     /**
296
-     * @return array
296
+     * @return string[]
297 297
      */
298 298
     private static function getTablesClasses()
299 299
     {
Please login to merge, or discard this patch.
Tests/Functional/Controller/UsersControllerTest.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -293,7 +293,7 @@
 block discarded – undo
293 293
     }
294 294
 
295 295
     /**
296
-     * @return array
296
+     * @return string[]
297 297
      */
298 298
     private static function getTablesClasses()
299 299
     {
Please login to merge, or discard this patch.
DataMapper/UserDataMapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
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
                 }
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
             $defaultMapper->mapData($params, $group);
56 56
 
57 57
             /*
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
                 );
Please login to merge, or discard this patch.
Controller/UsersController.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,6 @@
 block discarded – undo
20 20
 use Symfony\Component\DependencyInjection\ContainerInterface;
21 21
 use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
22 22
 use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
23
-use Modera\BackendSecurityBundle\Service\MailService;
24 23
 
25 24
 /**
26 25
  * @author    Sergei Vizel <[email protected]>
Please login to merge, or discard this 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.
Service/MailService.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 
53 53
     /**
54 54
      * @param User $user
55
-     * @param $plainPassword
55
+     * @param string $plainPassword
56 56
      *
57 57
      * @return array|bool
58 58
      */
Please login to merge, or discard this patch.
Tests/Unit/Controller/UsersControllerTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 use Modera\BackendSecurityBundle\Controller\UsersController;
7 7
 use Modera\BackendSecurityBundle\ModeraBackendSecurityBundle;
8 8
 use Modera\SecurityBundle\Entity\User;
9
-use Modera\SecurityBundle\PasswordStrength\PasswordGenerator;
10 9
 use Modera\SecurityBundle\PasswordStrength\PasswordManager;
11 10
 use Symfony\Bridge\Doctrine\RegistryInterface;
12 11
 use Symfony\Component\DependencyInjection\ContainerInterface;
Please login to merge, or discard this patch.