Code Duplication    Length = 11-12 lines in 2 locations

eZ/Publish/Core/Repository/LocationService.php 1 location

@@ 408-418 (lines=11) @@
405
            $newLocation = $this->persistenceHandler->locationHandler()->create($spiLocationCreateStruct);
406
407
            $urlAliasNames = $this->nameSchemaService->resolveUrlAliasSchema($content);
408
            foreach ($urlAliasNames as $languageCode => $name) {
409
                $this->persistenceHandler->urlAliasHandler()->publishUrlAliasForLocation(
410
                    $newLocation->id,
411
                    $newLocation->parentId,
412
                    $name,
413
                    $languageCode,
414
                    $content->contentInfo->alwaysAvailable,
415
                    // @todo: this is legacy storage specific for updating ezcontentobject_tree.path_identification_string, to be removed
416
                    $languageCode === $content->contentInfo->mainLanguageCode
417
                );
418
            }
419
420
            $this->repository->commit();
421
        } catch (Exception $e) {

eZ/Publish/Core/Repository/ContentService.php 1 location

@@ 1013-1024 (lines=12) @@
1010
        $locations = $this->repository->getLocationService()->loadLocations(
1011
            $content->getVersionInfo()->getContentInfo()
1012
        );
1013
        foreach ($locations as $location) {
1014
            foreach ($urlAliasNames as $languageCode => $name) {
1015
                $this->persistenceHandler->urlAliasHandler()->publishUrlAliasForLocation(
1016
                    $location->id,
1017
                    $location->parentLocationId,
1018
                    $name,
1019
                    $languageCode,
1020
                    $content->contentInfo->alwaysAvailable,
1021
                    $updatePathIdentificationString ? $languageCode === $content->contentInfo->mainLanguageCode : false
1022
                );
1023
            }
1024
        }
1025
    }
1026
1027
    /**