Completed
Push — master ( a72625...6a4bd4 )
by
unknown
01:39
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 */
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
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.