Code Duplication    Length = 8-8 lines in 2 locations

Controller/UsersController.php 2 locations

@@ 175-182 (lines=8) @@
172
                            'type' => 'user.profile_enabled',
173
                            'author' => $this->getUser()->getId(),
174
                        );
175
                    } else {
176
                        $userService->disable($user);
177
                        $activityMsg = T::trans('Profile disabled for user "%user%".', array('%user%' => $user->getUsername()));
178
                        $activityContext = array(
179
                            'type' => 'user.profile_disabled',
180
                            'author' => $this->getUser()->getId(),
181
                        );
182
                    }
183
                    $activityMgr->info($activityMsg, $activityContext);
184
                } else if (isset($params['plainPassword']) && $params['plainPassword']) {
185
                    // Password encoding and setting is done in "updated_entity_validator"
@@ 193-200 (lines=8) @@
190
                        'author' => $this->getUser()->getId(),
191
                    );
192
                    $activityMgr->info($activityMsg, $activityContext);
193
                } else {
194
                    $activityMsg = T::trans('Profile data is changed for user "%user%".', array('%user%' => $user->getUsername()));
195
                    $activityContext = array(
196
                        'type' => 'user.profile_updated',
197
                        'author' => $this->getUser()->getId(),
198
                    );
199
                    $activityMgr->info($activityMsg, $activityContext);
200
                }
201
            },
202
            'updated_entity_validator' => function (array $params, User $user, EntityValidatorInterface $validator, array $config, ContainerInterface $container) {
203
                $isBatchUpdatedBeingPerformed = !isset($params['record']);