Code Duplication    Length = 17-18 lines in 2 locations

eZ/Publish/Core/Repository/Repository.php 2 locations

@@ 435-452 (lines=18) @@
432
     *
433
     * @return \eZ\Publish\API\Repository\ContentService
434
     */
435
    public function getContentService()
436
    {
437
        if ($this->contentService !== null) {
438
            return $this->contentService;
439
        }
440
441
        $this->contentService = new ContentService(
442
            $this,
443
            $this->persistenceHandler,
444
            $this->getDomainMapper(),
445
            $this->getRelationProcessor(),
446
            $this->getNameSchemaService(),
447
            $this->getFieldTypeRegistry(),
448
            $this->serviceSettings['content']
449
        );
450
451
        return $this->contentService;
452
    }
453
454
    /**
455
     * Get Content Language Service.
@@ 484-500 (lines=17) @@
481
     *
482
     * @return \eZ\Publish\API\Repository\ContentTypeService
483
     */
484
    public function getContentTypeService()
485
    {
486
        if ($this->contentTypeService !== null) {
487
            return $this->contentTypeService;
488
        }
489
490
        $this->contentTypeService = new ContentTypeService(
491
            $this,
492
            $this->persistenceHandler->contentTypeHandler(),
493
            $this->getDomainMapper(),
494
            $this->getContentTypeDomainMapper(),
495
            $this->getFieldTypeRegistry(),
496
            $this->serviceSettings['contentType']
497
        );
498
499
        return $this->contentTypeService;
500
    }
501
502
    /**
503
     * Get Content Location Service.