Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 221-232 (lines=12) @@
218
                 * @todo This is a workaround for GeoJSON data insertion
219
                 * until we figured out, what we really want it to be.
220
                 */
221
                if ('general.locationForm' == $formIdentifier) {
222
                    $locElem = $instanceForm->getBaseFieldset()->get('geo-location');
223
                    if ($locElem instanceof \Geo\Form\GeoText) {
224
                        $loc = $locElem->getValue('entity');
225
                        $locations = $jobEntity->getLocations();
226
                        if (count($locations)) {
227
                            $locations->clear();
228
                        }
229
                        $locations->add($loc);
230
                        $jobEntity->setLocation($locElem->getValue());
231
                    }
232
                }
233
234
                $title = $jobEntity->getTitle();
235
                $templateTitle = $jobEntity->getTemplateValues()->getTitle();

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

@@ 93-104 (lines=12) @@
90
                 * until we figured out, what we really want it to be.
91
                 */
92
                $formId = $params->fromQuery('form');
93
                if ('preferredJob' == $formId) {
94
                    $locElem = $form->getBaseFieldset()->get('geo-location');
95
                    if ($locElem instanceof GeoText) {
96
                        $loc = $locElem->getValue('entity');
97
                        $locations = $cv->getPreferredJob()->getDesiredLocations();
98
                        if (count($locations)) {
99
                            $locations->clear();
100
                        }
101
                        $locations->add($loc);
102
                        $cv->getPreferredJob()->setDesiredLocation($locElem->getValue());
103
                    }
104
                }
105
106
                $repositories->store($cv);
107