From a201f61eeb6fb2befb641c4ff4fff689b87644bf Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 26 Feb 2024 15:05:20 +0200 Subject: [PATCH] ref --- application/Espo/Core/EntryPoint/EntryPointManager.php | 4 ++-- application/Espo/Repositories/Import.php | 7 +------ application/Espo/Services/Email.php | 4 ++-- application/Espo/Services/Import.php | 2 -- application/Espo/Services/Note.php | 3 --- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/application/Espo/Core/EntryPoint/EntryPointManager.php b/application/Espo/Core/EntryPoint/EntryPointManager.php index 7e83624f64..a6e69e0019 100644 --- a/application/Espo/Core/EntryPoint/EntryPointManager.php +++ b/application/Espo/Core/EntryPoint/EntryPointManager.php @@ -54,7 +54,7 @@ class EntryPointManager $className = $this->getClassName($name); if (!$className) { - throw new NotFoundSilent("Entry point '{$name}' not found."); + throw new NotFoundSilent("Entry point '$name' not found."); } $noAuth = false; @@ -79,7 +79,7 @@ class EntryPointManager $className = $this->getClassName($name); if (!$className) { - throw new NotFoundSilent("Entry point '{$name}' not found."); + throw new NotFoundSilent("Entry point '$name' not found."); } $entryPoint = $this->injectableFactory->create($className); diff --git a/application/Espo/Repositories/Import.php b/application/Espo/Repositories/Import.php index 96c5d92fad..084aa8cee0 100644 --- a/application/Espo/Repositories/Import.php +++ b/application/Espo/Repositories/Import.php @@ -31,21 +31,18 @@ namespace Espo\Repositories; use Espo\Entities\Import as ImportEntity; use Espo\Entities\ImportEntity as ImportEntityEntity; - use Espo\ORM\Collection; use Espo\ORM\Entity; use Espo\ORM\Query\Select as Query; use Espo\ORM\Query\SelectBuilder; - use Espo\Entities\Attachment as AttachmentEntity; - use Espo\Core\Repositories\Database; use Espo\Entities\ImportError; use LogicException; /** - * @extends Database<\Espo\Entities\Import> + * @extends Database */ class Import extends Database { @@ -76,8 +73,6 @@ class Import extends Database throw new LogicException(); } - $param = null; - switch ($link) { case 'imported': $param = 'isImported'; diff --git a/application/Espo/Services/Email.php b/application/Espo/Services/Email.php index 2912bc36bb..312b0eabe6 100644 --- a/application/Espo/Services/Email.php +++ b/application/Espo/Services/Email.php @@ -114,11 +114,11 @@ class Email extends Record return $entity; } - private function markAsRead(string $id, ?string $userId = null): void + private function markAsRead(string $id): void { $service = $this->injectableFactory->create(InboxService::class); - $service->markAsRead($id, $userId); + $service->markAsRead($id); } /** diff --git a/application/Espo/Services/Import.php b/application/Espo/Services/Import.php index 94c1537f32..34f0c8ee8d 100644 --- a/application/Espo/Services/Import.php +++ b/application/Espo/Services/Import.php @@ -31,7 +31,6 @@ namespace Espo\Services; use Espo\Repositories\Import as Repository; use Espo\Entities\Import as ImportEntity; - use Espo\Core\Acl\Table; use Espo\Core\Exceptions\Forbidden; use Espo\Core\Exceptions\NotFoundSilent; @@ -74,7 +73,6 @@ class Import extends Record ->withSearchParams($searchParams) ->build(); - /** @var \Espo\ORM\Collection<\Espo\ORM\Entity> $collection */ $collection = $this->getImportRepository()->findResultRecords($entity, $link, $query); $listLoadProcessor = $this->injectableFactory->create(ListLoadProcessor::class); diff --git a/application/Espo/Services/Note.php b/application/Espo/Services/Note.php index ce49ebb357..b8550d0b08 100644 --- a/application/Espo/Services/Note.php +++ b/application/Espo/Services/Note.php @@ -77,11 +77,8 @@ class Note extends Record $userTeamIdList = $this->user->getTeamIdList(); - /** @var string[] $userIdList */ $userIdList = $entity->getLinkMultipleIdList('users'); - /** @var string[] $portalIdList */ $portalIdList = $entity->getLinkMultipleIdList('portals'); - /** @var string[] $teamIdList */ $teamIdList = $entity->getLinkMultipleIdList('teams'); /** @var iterable $targetUserList */