Code Duplication    Length = 17-18 lines in 2 locations

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

@@ 468-485 (lines=18) @@
465
     *
466
     * @return \eZ\Publish\API\Repository\ContentService
467
     */
468
    public function getContentService()
469
    {
470
        if ($this->contentService !== null) {
471
            return $this->contentService;
472
        }
473
474
        $this->contentService = new ContentService(
475
            $this,
476
            $this->persistenceHandler,
477
            $this->getDomainMapper(),
478
            $this->getRelationProcessor(),
479
            $this->getNameSchemaService(),
480
            $this->getFieldTypeRegistry(),
481
            $this->serviceSettings['content']
482
        );
483
484
        return $this->contentService;
485
    }
486
487
    /**
488
     * Get Content Language Service.
@@ 517-533 (lines=17) @@
514
     *
515
     * @return \eZ\Publish\API\Repository\ContentTypeService
516
     */
517
    public function getContentTypeService()
518
    {
519
        if ($this->contentTypeService !== null) {
520
            return $this->contentTypeService;
521
        }
522
523
        $this->contentTypeService = new ContentTypeService(
524
            $this,
525
            $this->persistenceHandler->contentTypeHandler(),
526
            $this->getDomainMapper(),
527
            $this->getContentTypeDomainMapper(),
528
            $this->getFieldTypeRegistry(),
529
            $this->serviceSettings['contentType']
530
        );
531
532
        return $this->contentTypeService;
533
    }
534
535
    /**
536
     * Get Content Location Service.