Code Duplication    Length = 8-8 lines in 2 locations

module/Auth/src/Auth/Controller/ManageController.php 1 location

@@ 56-63 (lines=8) @@
53
            $data      = array_merge($postData, $filesData);
54
            $form->setData($data);
55
            
56
            if (!$form->isValid()) {
57
                return new JsonModel(
58
                    array(
59
                    'valid' => false,
60
                    'errors' => $form->getMessages(),
61
                    )
62
                );
63
            }
64
            
65
            $this->getServiceLocator()->get('repositories')->store($user);
66
            

module/Applications/src/Applications/Controller/ApplyController.php 1 location

@@ 225-232 (lines=8) @@
222
223
        $form->setData($data);
224
        
225
        if (!$form->isValid()) {
226
            return new JsonModel(
227
                array(
228
                'valid' => false,
229
                'errors' => $form->getMessages(),
230
                )
231
            );
232
        }
233
        $application = $this->container->getEntity();
234
        $this->getServiceLocator()->get('repositories')->store($application);
235