Code Duplication    Length = 17-18 lines in 2 locations

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

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