Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 75-82 (lines=8) @@
72
                $data      = array_merge($postData, $filesData);
73
                $form->setData($data);
74
                
75
                if (!$form->isValid()) {
76
                    return new JsonModel(
77
                        array(
78
                        'valid' => false,
79
                        'errors' => $form->getMessages(),
80
                        )
81
                    );
82
                }
83
                
84
                $serviceLocator->get('repositories')->store($user);
85
                

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

@@ 303-310 (lines=8) @@
300
301
        $form->setData($data);
302
        
303
        if (!$form->isValid()) {
304
            return new JsonModel(
305
                array(
306
                'valid' => false,
307
                'errors' => $form->getMessages(),
308
                )
309
            );
310
        }
311
        $application = $this->container->getEntity();
312
        $this->getServiceLocator()->get('repositories')->store($application);
313