From 2be2b7f459f1cccc550e8a80ab76e25ee91a8738 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 3 Aug 2020 12:48:24 +0300 Subject: [PATCH] orm fixes --- application/Espo/ORM/EntityManager.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/application/Espo/ORM/EntityManager.php b/application/Espo/ORM/EntityManager.php index a2079a0aaa..17bf19850c 100644 --- a/application/Espo/ORM/EntityManager.php +++ b/application/Espo/ORM/EntityManager.php @@ -111,7 +111,7 @@ class EntityManager return $this->query; } - protected function getMapperClassName(string $name) + protected function getMapperClassName(string $name) : string { $className = null; @@ -294,10 +294,9 @@ class EntityManager } /** - * Create a collection. - * Entity type can be omitted. + * Create a collection. Entity type can be omitted. */ - public function createCollection(?string $entityType = null, array $data = []) + public function createCollection(?string $entityType = null, array $data = []) : EntityCollection { return new EntityCollection($data, $entityType, $this->entityFactory); } @@ -305,12 +304,12 @@ class EntityManager /** * Create an STH collection. An STH collection is preferable when a select query returns a large number of rows. */ - public function createSthCollection(string $entityType, array $selectParams = []) + public function createSthCollection(string $entityType, array $selectParams = []) : SthCollection { return new SthCollection($entityType, $this, $selectParams); } - public function getEntityFactory() : object + public function getEntityFactory() : EntityFactory { return $this->entityFactory; }