From 9152c75572bef0b687d6533eb31e22c6918bdbdc Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 9 Dec 2024 13:10:03 +0200 Subject: [PATCH] ref --- application/Espo/Entities/Email.php | 6 +++--- application/Espo/Entities/EmailTemplate.php | 8 ++++---- application/Espo/Entities/Note.php | 11 +++++------ application/Espo/Modules/Crm/Entities/CaseObj.php | 8 ++++---- application/Espo/Modules/Crm/Entities/Contact.php | 8 ++++---- application/Espo/Modules/Crm/Entities/Task.php | 8 ++++---- 6 files changed, 24 insertions(+), 25 deletions(-) diff --git a/application/Espo/Entities/Email.php b/application/Espo/Entities/Email.php index 3d0e20ac35..5d4dd16261 100644 --- a/application/Espo/Entities/Email.php +++ b/application/Espo/Entities/Email.php @@ -37,8 +37,8 @@ use Espo\Core\Field\DateTime; use Espo\Core\Field\LinkParent; use Espo\Core\Field\Link; use Espo\Modules\Crm\Entities\Account; -use Espo\ORM\Collection; use Espo\ORM\Entity as OrmEntity; +use Espo\ORM\EntityCollection; use Espo\Repositories\Email as EmailRepository; use Espo\Tools\Email\Util as EmailUtil; @@ -884,11 +884,11 @@ class Email extends Entity } /** - * @return iterable + * @return EntityCollection */ public function getAttachments(): iterable { - /** @var Collection */ + /** @var EntityCollection */ return $this->relations->getMany('attachments'); } diff --git a/application/Espo/Entities/EmailTemplate.php b/application/Espo/Entities/EmailTemplate.php index c4b328803f..4576fe1a8c 100644 --- a/application/Espo/Entities/EmailTemplate.php +++ b/application/Espo/Entities/EmailTemplate.php @@ -30,7 +30,7 @@ namespace Espo\Entities; use Espo\Core\ORM\Entity; -use Espo\ORM\Collection; +use Espo\ORM\EntityCollection; class EmailTemplate extends Entity { @@ -61,11 +61,11 @@ class EmailTemplate extends Entity } /** - * @return iterable + * @return EntityCollection */ - public function getAttachments(): iterable + public function getAttachments(): EntityCollection { - /** @var Collection */ + /** @var EntityCollection */ return $this->relations->getMany('attachments'); } } diff --git a/application/Espo/Entities/Note.php b/application/Espo/Entities/Note.php index af15e2bd0b..1f7aac799f 100644 --- a/application/Espo/Entities/Note.php +++ b/application/Espo/Entities/Note.php @@ -32,12 +32,11 @@ namespace Espo\Entities; use Espo\Core\Field\LinkParent; use Espo\Core\Name\Field; use Espo\Core\ORM\Entity; - use Espo\Core\Field\DateTime; - -use Espo\ORM\Collection; use Espo\ORM\Entity as OrmEntity; +use Espo\ORM\EntityCollection; use Espo\ORM\Name\Attribute; + use RuntimeException; use stdClass; @@ -350,11 +349,11 @@ class Note extends Entity } /** - * @return iterable + * @return EntityCollection */ - public function getAttachments(): iterable + public function getAttachments(): EntityCollection { - /** @var Collection */ + /** @var EntityCollection */ return $this->relations->getMany('attachments'); } } diff --git a/application/Espo/Modules/Crm/Entities/CaseObj.php b/application/Espo/Modules/Crm/Entities/CaseObj.php index 3a61d52909..9e125abbca 100644 --- a/application/Espo/Modules/Crm/Entities/CaseObj.php +++ b/application/Espo/Modules/Crm/Entities/CaseObj.php @@ -35,7 +35,7 @@ use Espo\Core\Name\Field; use Espo\Core\ORM\Entity; use Espo\Entities\Attachment; use Espo\Entities\User; -use Espo\ORM\Collection; +use Espo\ORM\EntityCollection; class CaseObj extends Entity { @@ -114,11 +114,11 @@ class CaseObj extends Entity } /** - * @return iterable + * @return EntityCollection */ - public function getAttachments(): iterable + public function getAttachments(): EntityCollection { - /** @var Collection */ + /** @var EntityCollection */ return $this->relations->getMany('attachments'); } diff --git a/application/Espo/Modules/Crm/Entities/Contact.php b/application/Espo/Modules/Crm/Entities/Contact.php index f7336864f8..2ec8de4f0b 100644 --- a/application/Espo/Modules/Crm/Entities/Contact.php +++ b/application/Espo/Modules/Crm/Entities/Contact.php @@ -33,8 +33,8 @@ use Espo\Core\Entities\Person; use Espo\Core\Field\Link; use Espo\Core\Field\LinkMultiple; use Espo\Core\Name\Field; -use Espo\Core\Record\Collection; use Espo\Entities\User; +use Espo\ORM\EntityCollection; class Contact extends Person { @@ -61,11 +61,11 @@ class Contact extends Person /** * Get accounts. * - * @return Collection + * @return EntityCollection */ - public function getAccounts(): Collection + public function getAccounts(): EntityCollection { - /** @var Collection */ + /** @var EntityCollection */ return $this->relations->getMany('accounts'); } diff --git a/application/Espo/Modules/Crm/Entities/Task.php b/application/Espo/Modules/Crm/Entities/Task.php index 5e2562e29a..5241a64067 100644 --- a/application/Espo/Modules/Crm/Entities/Task.php +++ b/application/Espo/Modules/Crm/Entities/Task.php @@ -37,8 +37,8 @@ use Espo\Core\Name\Field; use Espo\Core\ORM\Entity; use Espo\Entities\Attachment; use Espo\Entities\User; -use Espo\ORM\Collection; use Espo\ORM\Entity as OrmEntity; +use Espo\ORM\EntityCollection; class Task extends Entity { @@ -104,11 +104,11 @@ class Task extends Entity } /** - * @return iterable + * @return EntityCollection */ - public function getAttachments(): iterable + public function getAttachments(): EntityCollection { - /** @var Collection */ + /** @var EntityCollection */ return $this->relations->getMany('attachments'); }