Code Duplication    Length = 17-18 lines in 2 locations

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

@@ 451-468 (lines=18) @@
448
     *
449
     * @return \eZ\Publish\API\Repository\ContentService
450
     */
451
    public function getContentService()
452
    {
453
        if ($this->contentService !== null) {
454
            return $this->contentService;
455
        }
456
457
        $this->contentService = new ContentService(
458
            $this,
459
            $this->persistenceHandler,
460
            $this->getDomainMapper(),
461
            $this->getRelationProcessor(),
462
            $this->getNameSchemaService(),
463
            $this->getFieldTypeRegistry(),
464
            $this->serviceSettings['content']
465
        );
466
467
        return $this->contentService;
468
    }
469
470
    /**
471
     * Get Content Language Service.
@@ 500-516 (lines=17) @@
497
     *
498
     * @return \eZ\Publish\API\Repository\ContentTypeService
499
     */
500
    public function getContentTypeService()
501
    {
502
        if ($this->contentTypeService !== null) {
503
            return $this->contentTypeService;
504
        }
505
506
        $this->contentTypeService = new ContentTypeService(
507
            $this,
508
            $this->persistenceHandler->contentTypeHandler(),
509
            $this->getDomainMapper(),
510
            $this->getContentTypeDomainMapper(),
511
            $this->getFieldTypeRegistry(),
512
            $this->serviceSettings['contentType']
513
        );
514
515
        return $this->contentTypeService;
516
    }
517
518
    /**
519
     * Get Content Location Service.