Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 340-347 (lines=8) @@
337
        //$filesData = $form->getOption('use_files_array') ? $params->fromFiles() : array();
338
        $form->setData(array_merge($postData,$_FILES));
339
        
340
        if (!$form->isValid()) {
341
            return new JsonModel(
342
                array(
343
                'valid' => false,
344
                'errors' => $form->getMessages(),
345
                )
346
            );
347
        }
348
        $application = $this->formContainer->getEntity();
349
        $this->repositories->store($application);
350
        

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

@@ 128-135 (lines=8) @@
125
                $data      = array_merge($postData, $filesData);
126
                $form->setData($data);
127
                
128
                if (!$form->isValid()) {
129
                    return new JsonModel(
130
                        array(
131
                        'valid' => false,
132
                        'errors' => $form->getMessages(),
133
                        )
134
                    );
135
                }
136
                
137
                $this->repositories->store($user);
138