Code Duplication    Length = 8-8 lines in 2 locations

src/SMG/UserBundle/Controller/UsersController.php 2 locations

@@ 87-94 (lines=8) @@
84
            ['new_password', 'old_password']
85
        );
86
87
        if ($this->isPasswordCorrect($user, $requestData['old_password'])) {
88
            return $this->handleView(
89
                new View(
90
                    ['message' => 'bst.password.wrong'],
91
                    Response::HTTP_FORBIDDEN
92
                )
93
            );
94
        }
95
96
        $this->updateUserPassword($user, $requestData['new_password']);
97
@@ 116-123 (lines=8) @@
113
            ['new_contact_info', 'password']
114
        );
115
116
        if ($this->isPasswordCorrect($user, $requestData['password'])) {
117
            return $this->handleView(
118
                new View(
119
                    ['message' => 'bst.password.wrong'],
120
                    Response::HTTP_FORBIDDEN
121
                )
122
            );
123
        }
124
125
        $contactInfo = $requestData['new_contact_info'];
126