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

@@ 313-320 (lines=8) @@
310
311
        $form->setData($data);
312
        
313
        if (!$form->isValid()) {
314
            return new JsonModel(
315
                array(
316
                'valid' => false,
317
                'errors' => $form->getMessages(),
318
                )
319
            );
320
        }
321
        $application = $this->container->getEntity();
322
        $this->getServiceLocator()->get('repositories')->store($application);
323