Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 237-244 (lines=8) @@
234
235
        $form->setData($data);
236
        
237
        if (!$form->isValid()) {
238
            return new JsonModel(
239
                array(
240
                'valid' => false,
241
                'errors' => $form->getMessages(),
242
                )
243
            );
244
        }
245
        $application = $this->container->getEntity();
246
        $this->getServiceLocator()->get('repositories')->store($application);
247
        

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