From 6f7ef1448296cd4f2ced9848dce381bd74f2f2ce Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Fri, 29 Oct 2021 13:48:03 +0300 Subject: [PATCH] fixes --- application/Espo/ORM/Query/InsertBuilder.php | 4 +++- application/Espo/Services/Email.php | 8 ++++---- application/Espo/Services/EmailAccount.php | 4 ++-- application/Espo/Services/RecordTree.php | 6 +++--- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/application/Espo/ORM/Query/InsertBuilder.php b/application/Espo/ORM/Query/InsertBuilder.php index a8d6e2b098..7912ad6112 100644 --- a/application/Espo/ORM/Query/InsertBuilder.php +++ b/application/Espo/ORM/Query/InsertBuilder.php @@ -56,7 +56,9 @@ class InsertBuilder implements Builder */ public function clone(Insert $query): self { - return $this->cloneInternal($query); + $this->cloneInternal($query); + + return $this; } /** diff --git a/application/Espo/Services/Email.php b/application/Espo/Services/Email.php index 5c55f48d28..21bde72f4d 100644 --- a/application/Espo/Services/Email.php +++ b/application/Espo/Services/Email.php @@ -55,7 +55,7 @@ use Espo\Core\{ use Exception; use Throwable; -use StdClass; +use stdClass; class Email extends Record implements @@ -418,7 +418,7 @@ class Email extends Record implements } } - public function create(StdClass $data, CreateParams $params): Entity + public function create(stdClass $data, CreateParams $params): Entity { $entity = parent::create($data, $params); @@ -752,7 +752,7 @@ class Email extends Record implements return $fromAddress; } - public function getCopiedAttachments(string $id, ?string $parentType = null, ?string $parentId = null): StdClass + public function getCopiedAttachments(string $id, ?string $parentType = null, ?string $parentId = null): stdClass { $ids = []; $names = (object) []; @@ -937,7 +937,7 @@ class Email extends Record implements } } - public function getFoldersNotReadCounts(): StdClass + public function getFoldersNotReadCounts(): stdClass { $data = []; diff --git a/application/Espo/Services/EmailAccount.php b/application/Espo/Services/EmailAccount.php index 7347188e92..41f8f7ded2 100644 --- a/application/Espo/Services/EmailAccount.php +++ b/application/Espo/Services/EmailAccount.php @@ -59,7 +59,7 @@ use Exception; use Throwable; use DateTime; use DateTimeZone; -use StdClass; +use stdClass; class EmailAccount extends Record implements @@ -227,7 +227,7 @@ class EmailAccount extends Record implements return $storage; } - public function create(StdClass $data, CreateParams $params): Entity + public function create(stdClass $data, CreateParams $params): Entity { if (!$this->getUser()->isAdmin()) { $count = $this->entityManager diff --git a/application/Espo/Services/RecordTree.php b/application/Espo/Services/RecordTree.php index ff229de1a1..66a1858069 100644 --- a/application/Espo/Services/RecordTree.php +++ b/application/Espo/Services/RecordTree.php @@ -46,7 +46,7 @@ use Espo\Core\{ use Espo\Core\Acl\Exceptions\NotImplemented; -use StdClass; +use stdClass; class RecordTree extends Record { @@ -200,7 +200,7 @@ class RecordTree extends Record return true; } - public function getCategoryData(?string $id): ?StdClass + public function getCategoryData(?string $id): ?stdClass { if (!$this->acl->check($this->entityType, AclTable::ACTION_READ)) { throw new Forbidden(); @@ -293,7 +293,7 @@ class RecordTree extends Record } } - public function update(string $id, StdClass $data, UpdateParams $params): Entity + public function update(string $id, stdClass $data, UpdateParams $params): Entity { if (!empty($data->parentId) && $data->parentId === $id) { throw new Forbidden();