diff --git a/application/Espo/ORM/BaseEntity.php b/application/Espo/ORM/BaseEntity.php index 745beeeef1..3d25248fcd 100644 --- a/application/Espo/ORM/BaseEntity.php +++ b/application/Espo/ORM/BaseEntity.php @@ -137,7 +137,7 @@ class BaseEntity implements Entity */ public function getId(): string { - /** @var ?string */ + /** @var ?string $id */ $id = $this->get('id'); if ($id === null) { @@ -895,7 +895,7 @@ class BaseEntity implements Entity return true; } - /** @var string */ + /** @var string $type */ $type = $this->getAttributeType($name); return !self::areValuesEqual( diff --git a/application/Espo/ORM/EntityCollection.php b/application/Espo/ORM/EntityCollection.php index c8c2ae99ad..743fde6edd 100644 --- a/application/Espo/ORM/EntityCollection.php +++ b/application/Espo/ORM/EntityCollection.php @@ -251,7 +251,7 @@ class EntityCollection implements Collection, Iterator, Countable, ArrayAccess, assert($this->entityType !== null); - /** @var TEntity */ + /** @var TEntity $entity */ $entity = $this->entityFactory->create($this->entityType); $entity->set($dataArray); @@ -418,7 +418,7 @@ class EntityCollection implements Collection, Iterator, Countable, ArrayAccess, $entityList[] = $entity; } - /** @var self */ + /** @var self $obj */ $obj = new EntityCollection($entityList, $sthCollection->getEntityType()); $obj->setAsFetched(); diff --git a/application/Espo/ORM/EntityManager.php b/application/Espo/ORM/EntityManager.php index 28e4e6f5fa..455d3c9f61 100644 --- a/application/Espo/ORM/EntityManager.php +++ b/application/Espo/ORM/EntityManager.php @@ -161,7 +161,7 @@ class EntityManager throw new RuntimeException("Query composer for '{$platform}' platform does not exits."); } - /** @var QueryComposer */ + /** @var QueryComposer $queryComposer */ $queryComposer = new $className( $this->pdoProvider->get(), $this->entityFactory, @@ -185,7 +185,7 @@ class EntityManager $className = BaseLocker::class; } - /** @var Locker */ + /** @var Locker $locker */ $locker = new $className($this->pdoProvider->get(), $this->queryComposer, $this->transactionManager); $this->locker = $locker; @@ -232,7 +232,7 @@ class EntityManager if ($name === self::RDB_MAPPER_NAME) { $className = $this->getRDBMapperClassName(); - /** @var Mapper */ + /** @var Mapper $mapper */ $mapper = new $className( $this->pdoProvider->get(), $this->entityFactory, diff --git a/application/Espo/ORM/Mapper/BaseMapper.php b/application/Espo/ORM/Mapper/BaseMapper.php index 56b52e2e18..2e96dfe029 100644 --- a/application/Espo/ORM/Mapper/BaseMapper.php +++ b/application/Espo/ORM/Mapper/BaseMapper.php @@ -490,7 +490,7 @@ class BaseMapper implements RDBMapper */ public function countRelated(Entity $entity, string $relationName, ?Select $select = null): int { - /** @var int|null */ + /** @var int|null $result */ $result = $this->selectRelatedInternal($entity, $relationName, $select, true); return (int) $result; diff --git a/application/Espo/ORM/QueryComposer/BaseQueryComposer.php b/application/Espo/ORM/QueryComposer/BaseQueryComposer.php index b2535df4ef..e3471cc435 100644 --- a/application/Espo/ORM/QueryComposer/BaseQueryComposer.php +++ b/application/Espo/ORM/QueryComposer/BaseQueryComposer.php @@ -1521,7 +1521,7 @@ abstract class BaseQueryComposer implements QueryComposer $modifiedOrder[] = $newItem; } - /** @var string */ + /** @var string $part */ $part = $this->getOrderExpressionPart($entity, $modifiedOrder, null, $params, true); return $part; @@ -1631,7 +1631,7 @@ abstract class BaseQueryComposer implements QueryComposer foreach ($j[2] as $k => $value) { $value = str_replace('{alias}', $alias, $value); - /** @var string */ + /** @var string $left */ $left = $k; $left = str_replace('{alias}', $alias, $left); @@ -1670,7 +1670,7 @@ abstract class BaseQueryComposer implements QueryComposer foreach ($j[2] as $k => $value) { $value = str_replace('{alias}', $alias, $value); - /** @var string */ + /** @var string $left */ $left = $k; $left = str_replace('{alias}', $alias, $left); @@ -1946,7 +1946,7 @@ abstract class BaseQueryComposer implements QueryComposer return null; } - /** @var string */ + /** @var string $part */ $part = $this->getAttributePath($entity, $attribute0, $params); return [$part, $alias]; @@ -1978,7 +1978,7 @@ abstract class BaseQueryComposer implements QueryComposer return null; } - /** @var string */ + /** @var string $fieldPath */ $fieldPath = $this->getAttributePath($entity, $attribute, $params); if ($attributeType === Entity::TEXT && $maxTextColumnsLength !== null) { @@ -2372,7 +2372,7 @@ abstract class BaseQueryComposer implements QueryComposer if (!array_key_exists($string, $this->attributeDbMapCache)) { $string[0] = strtolower($string[0]); - /** @var string */ + /** @var string $dbString */ $dbString = preg_replace_callback( '/([A-Z])/', fn($matches) => '_' . strtolower($matches[1]), diff --git a/application/Espo/ORM/Repository/RDBRelation.php b/application/Espo/ORM/Repository/RDBRelation.php index b9e12a44b1..b177b874ba 100644 --- a/application/Espo/ORM/Repository/RDBRelation.php +++ b/application/Espo/ORM/Repository/RDBRelation.php @@ -448,7 +448,7 @@ class RDBRelation throw new RuntimeException(); } - /** @var string */ + /** @var string $foreignEntityType */ $foreignEntityType = $this->foreignEntityType; $seed = $this->entityManager->getEntityFactory()->create($foreignEntityType); @@ -473,7 +473,7 @@ class RDBRelation throw new RuntimeException(); } - /** @var string */ + /** @var string $foreignEntityType */ $foreignEntityType = $this->foreignEntityType; $seed = $this->entityManager->getEntityFactory()->create($foreignEntityType); @@ -498,7 +498,7 @@ class RDBRelation throw new RuntimeException(); } - /** @var string */ + /** @var string $foreignEntityType */ $foreignEntityType = $this->foreignEntityType; $seed = $this->entityManager->getEntityFactory()->create($foreignEntityType); diff --git a/application/Espo/ORM/Repository/RDBRepository.php b/application/Espo/ORM/Repository/RDBRepository.php index 70028d6ecf..7e6f754f31 100644 --- a/application/Espo/ORM/Repository/RDBRepository.php +++ b/application/Espo/ORM/Repository/RDBRepository.php @@ -346,7 +346,7 @@ class RDBRepository implements Repository ); } - /** @var Collection|TEntity|null */ + /** @var Collection|TEntity|null $result */ $result = $this->getMapper()->selectRelated($entity, $relationName, $select); if ($result instanceof SthCollection) { @@ -806,7 +806,7 @@ class RDBRepository implements Repository throw new RuntimeException("Can't clone a query of a different entity type."); } - /** @var RDBSelectBuilder */ + /** @var RDBSelectBuilder $builder */ $builder = new RDBSelectBuilder($this->entityManager, $this->entityType, $query); return $builder; @@ -1000,7 +1000,7 @@ class RDBRepository implements Repository */ protected function createSelectBuilder(): RDBSelectBuilder { - /** @var RDBSelectBuilder */ + /** @var RDBSelectBuilder $builder */ $builder = new RDBSelectBuilder($this->entityManager, $this->entityType); return $builder; diff --git a/application/Espo/ORM/Repository/RDBSelectBuilder.php b/application/Espo/ORM/Repository/RDBSelectBuilder.php index f5be204a3c..115dfb5f98 100644 --- a/application/Espo/ORM/Repository/RDBSelectBuilder.php +++ b/application/Espo/ORM/Repository/RDBSelectBuilder.php @@ -67,7 +67,7 @@ class RDBSelectBuilder { $this->entityManager = $entityManager; - /** @var RDBRepository */ + /** @var RDBRepository $repository */ $repository = $this->entityManager->getRepository($entityType); $this->repository = $repository; diff --git a/application/Espo/ORM/SthCollection.php b/application/Espo/ORM/SthCollection.php index b3c485d681..1040546b01 100644 --- a/application/Espo/ORM/SthCollection.php +++ b/application/Espo/ORM/SthCollection.php @@ -218,7 +218,7 @@ class SthCollection implements Collection, IteratorAggregate, Countable */ public static function fromQuery(SelectQuery $query, EntityManager $entityManager): self { - /** @var self */ + /** @var self $obj */ $obj = new self($entityManager); $entityType = $query->getFrom(); @@ -238,7 +238,7 @@ class SthCollection implements Collection, IteratorAggregate, Countable */ public static function fromSql(string $entityType, string $sql, EntityManager $entityManager): self { - /** @var self */ + /** @var self $obj */ $obj = new self($entityManager); $obj->entityType = $entityType; diff --git a/application/Espo/Repositories/Email.php b/application/Espo/Repositories/Email.php index 6f9c1effdd..3b7458636f 100644 --- a/application/Espo/Repositories/Email.php +++ b/application/Espo/Repositories/Email.php @@ -421,7 +421,7 @@ class Email extends Database implements public function applyUsersFilters(EmailEntity $entity): void { - /** @var string[] */ + /** @var string[] $userIdList */ $userIdList = $entity->getLinkMultipleIdList('users'); foreach ($userIdList as $userId) { @@ -460,7 +460,7 @@ class Email extends Database implements $entity->get('parentId') && $entity->isAttributeChanged('parentId') ) { - /** @var \Espo\ORM\Collection */ + /** @var \Espo\ORM\Collection $replyList */ $replyList = $this->findRelated($entity, 'replies'); foreach ($replyList as $reply) { diff --git a/application/Espo/Repositories/ExternalAccount.php b/application/Espo/Repositories/ExternalAccount.php index a20632f583..db504167ef 100644 --- a/application/Espo/Repositories/ExternalAccount.php +++ b/application/Espo/Repositories/ExternalAccount.php @@ -45,7 +45,7 @@ class ExternalAccount extends Database $entity = parent::getById($id); if (!$entity) { - /** @var ExternalAccountEntity */ + /** @var ExternalAccountEntity $entity */ $entity = $this->get(); $entity->set('id', $id); diff --git a/application/Espo/Repositories/Import.php b/application/Espo/Repositories/Import.php index c3e2a46d60..52ee49ba68 100644 --- a/application/Espo/Repositories/Import.php +++ b/application/Espo/Repositories/Import.php @@ -99,7 +99,7 @@ class Import extends Database return $query; } - /** @var \Espo\ORM\Query\SelectBuilder */ + /** @var \Espo\ORM\Query\SelectBuilder $builder */ $builder = $this->entityManager->getQueryBuilder()->clone($query); $builder->join( diff --git a/application/Espo/Repositories/Integration.php b/application/Espo/Repositories/Integration.php index 59d0a0cd75..cdf0848721 100644 --- a/application/Espo/Repositories/Integration.php +++ b/application/Espo/Repositories/Integration.php @@ -45,7 +45,7 @@ class Integration extends Database $entity = parent::getById($id); if (!$entity) { - /** @var IntegrationEntity */ + /** @var IntegrationEntity $entity */ $entity = $this->get(); $entity->set('id', $id); diff --git a/application/Espo/Repositories/Preferences.php b/application/Espo/Repositories/Preferences.php index 5af3dcd86a..32ad84bd2e 100644 --- a/application/Espo/Repositories/Preferences.php +++ b/application/Espo/Repositories/Preferences.php @@ -147,7 +147,7 @@ class Preferences implements Repository, return; } - /** @var array> */ + /** @var array> $fields */ $fields = $this->metadata->get('entityDefs.Preferences.fields'); $defaults = []; diff --git a/application/Espo/Repositories/UserData.php b/application/Espo/Repositories/UserData.php index af8482ca51..4e869fb3a1 100644 --- a/application/Espo/Repositories/UserData.php +++ b/application/Espo/Repositories/UserData.php @@ -39,7 +39,7 @@ class UserData extends Database { public function getByUserId(string $userId): ?UserDataEntity { - /** @var ?UserDataEntity */ + /** @var ?UserDataEntity $userData */ $userData = $this ->where(['userId' => $userId]) ->findOne(); diff --git a/application/Espo/Services/AdminNotifications.php b/application/Espo/Services/AdminNotifications.php index 66778f9f9f..9ed02157b0 100644 --- a/application/Espo/Services/AdminNotifications.php +++ b/application/Espo/Services/AdminNotifications.php @@ -197,7 +197,7 @@ class AdminNotifications implements curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60); - /** @var string|false */ + /** @var string|false $result */ $result = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); diff --git a/application/Espo/Services/App.php b/application/Espo/Services/App.php index f7d2b1cf7a..be7fee647b 100644 --- a/application/Espo/Services/App.php +++ b/application/Espo/Services/App.php @@ -165,7 +165,7 @@ class App ]; foreach (($this->metadata->get(['app', 'appParams']) ?? []) as $paramKey => $item) { - /** @var ?class-string */ + /** @var ?class-string $className */ $className = $item['className'] ?? null; if (!$className) { @@ -173,7 +173,7 @@ class App } try { - /** @var AppParam */ + /** @var AppParam $obj */ $obj = $this->injectableFactory->create($className); $itemParams = $obj->get(); @@ -245,7 +245,7 @@ class App if (!$this->user->isAdmin()) { $data = unserialize(serialize($data)); - /** @var string[] */ + /** @var string[] $scopeList */ $scopeList = array_keys($this->metadata->get(['scopes'], [])); foreach ($scopeList as $scope) { @@ -292,7 +292,7 @@ class App $entityManager = $this->entityManager; - /** @var string[] */ + /** @var string[] $teamIdList */ $teamIdList = $user->getLinkMultipleIdList('teams'); $groupEmailAccountPermission = $this->acl->get('groupEmailAccountPermission'); @@ -427,7 +427,7 @@ class App */ public function jobPopulateArrayValues(): void { - /** @var string[] */ + /** @var string[] $scopeList */ $scopeList = array_keys($this->metadata->get(['scopes'])); $query = $this->entityManager->getQueryBuilder() diff --git a/application/Espo/Services/Attachment.php b/application/Espo/Services/Attachment.php index 595c1f8f91..4eecf0bb72 100644 --- a/application/Espo/Services/Attachment.php +++ b/application/Espo/Services/Attachment.php @@ -311,7 +311,7 @@ class Attachment extends Record $mimeType = $this->getMimeTypeUtil()->getMimeTypeByExtension($extension) ?? $attachment->getType(); - /** @var string[] */ + /** @var string[] $accept */ $accept = $this->metadata->get(['entityDefs', $entityType, 'fields', $field, 'accept']) ?? []; if ($accept === []) { @@ -348,7 +348,7 @@ class Attachment extends Record $mimeType = $this->getMimeTypeUtil()->getMimeTypeByExtension($extension); - /** @var string[] */ + /** @var string[] $imageTypeList */ $imageTypeList = $this->metadata->get(['app', 'image', 'allowedFileTypeList']) ?? []; if (!in_array($mimeType, $imageTypeList)) { @@ -381,7 +381,7 @@ class Attachment extends Record return; } - /** @var ?string */ + /** @var ?string $contents */ $contents = $attachment->get('contents'); if (!$contents && !$filePath) { @@ -481,7 +481,7 @@ class Attachment extends Record $this->checkAttachmentField($relatedEntityType, $field); - /** @var AttachmentEntity|null */ + /** @var AttachmentEntity|null $attachment */ $attachment = $this->getEntity($data->id); if (!$attachment) { @@ -619,7 +619,7 @@ class Attachment extends Record curl_setopt_array($ch, $opts); - /** @var string|false */ + /** @var string|false $response */ $response = curl_exec($ch); if ($response === false) { @@ -650,7 +650,7 @@ class Attachment extends Record } if (!$type) { - /** @var string */ + /** @var string $extension */ $extension = preg_replace('#\?.*#', '', pathinfo($url, \PATHINFO_EXTENSION)); $type = $this->getMimeTypeUtil()->getMimeTypeByExtension($extension); @@ -662,7 +662,7 @@ class Attachment extends Record return null; } - /** @var string[] */ + /** @var string[] $imageTypeList */ $imageTypeList = $this->metadata->get(['app', 'image', 'allowedFileTypeList']) ?? []; if (!in_array($type, $imageTypeList)) { @@ -681,7 +681,7 @@ class Attachment extends Record */ public function getFileData(string $id): stdClass { - /** @var AttachmentEntity|null */ + /** @var AttachmentEntity|null $attachment */ $attachment = $this->getEntity($id); if (!$attachment) { diff --git a/application/Espo/Services/Email.php b/application/Espo/Services/Email.php index 4711ebe0da..64f6ef595c 100644 --- a/application/Espo/Services/Email.php +++ b/application/Espo/Services/Email.php @@ -120,7 +120,7 @@ class Email extends Record implements public function getUserSmtpParams(string $userId): ?SmtpParams { - /** @var ?User */ + /** @var ?User $user */ $user = $this->entityManager->getEntityById(User::ENTITY_TYPE, $userId); if (!$user) { @@ -307,10 +307,10 @@ class Email extends Record implements $parent->getEntityType() == CaseObj::ENTITY_TYPE && $parent->get('inboundEmailId') ) { - /** @var string */ + /** @var string $inboundEmailId */ $inboundEmailId = $parent->get('inboundEmailId'); - /** @var ?InboundEmail */ + /** @var ?InboundEmail $inboundEmail */ $inboundEmail = $this->entityManager->getEntityById(InboundEmail::ENTITY_TYPE, $inboundEmailId); if ($inboundEmail && $inboundEmail->get('replyToAddress')) { @@ -413,7 +413,7 @@ class Email extends Record implements return; } - /** @var class-string */ + /** @var class-string $handlerClassName */ $handlerClassName = $smtpHandlers->$emailAddress; try { @@ -474,7 +474,7 @@ class Email extends Record implements */ public function create(stdClass $data, CreateParams $params): Entity { - /** @var EmailEntity */ + /** @var EmailEntity $entity */ $entity = parent::create($data, $params); if ($entity->get('status') === EmailEntity::STATUS_SENDING) { @@ -812,7 +812,7 @@ class Email extends Record implements $fromName = ''; if ($string && stripos($string, '<') !== false) { - /** @var string */ + /** @var string $replasedString */ $replasedString = preg_replace('/(<.*>)/', '', $string); $fromName = trim($replasedString, '" '); @@ -873,11 +873,11 @@ class Email extends Record implements $attachmentsIds = $email->get('attachmentsIds'); foreach ($attachmentsIds as $attachmentId) { - /** @var ?Attachment */ + /** @var ?Attachment $source */ $source = $this->entityManager->getEntityById(Attachment::ENTITY_TYPE, $attachmentId); if ($source) { - /** @var Attachment */ + /** @var Attachment $attachment */ $attachment = $this->entityManager->getNewEntity(Attachment::ENTITY_TYPE); $attachment->set('role', Attachment::ROLE_ATTACHMENT); diff --git a/application/Espo/Services/EmailAccount.php b/application/Espo/Services/EmailAccount.php index 3a6ba0eacc..41d92ee786 100644 --- a/application/Espo/Services/EmailAccount.php +++ b/application/Espo/Services/EmailAccount.php @@ -167,7 +167,7 @@ class EmailAccount extends Record implements */ public function applySmtpHandler(EmailAccountEntity $emailAccount, array &$params): void { - /** @var ?class-string */ + /** @var ?class-string $handlerClassName */ $handlerClassName = $emailAccount->get('smtpHandler'); if (!$handlerClassName) { diff --git a/application/Espo/Services/EmailTemplate.php b/application/Espo/Services/EmailTemplate.php index ab9f587f69..690aeb34b8 100644 --- a/application/Espo/Services/EmailTemplate.php +++ b/application/Espo/Services/EmailTemplate.php @@ -106,7 +106,7 @@ class EmailTemplate extends Record implements */ public function parse(string $id, array $params = [], bool $copyAttachments = false): array { - /** @var EmailTemplateEntity|null */ + /** @var EmailTemplateEntity|null $emailTemplate */ $emailTemplate = $this->getEntity($id); if (empty($emailTemplate)) { diff --git a/application/Espo/Services/Import.php b/application/Espo/Services/Import.php index aeb124399b..0f807f4861 100644 --- a/application/Espo/Services/Import.php +++ b/application/Espo/Services/Import.php @@ -76,7 +76,7 @@ class Import extends Record ->withSearchParams($searchParams) ->build(); - /** @var \Espo\ORM\Collection<\Espo\ORM\Entity> */ + /** @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/InboundEmail.php b/application/Espo/Services/InboundEmail.php index d7b8e8cab9..89e5c7a4fb 100644 --- a/application/Espo/Services/InboundEmail.php +++ b/application/Espo/Services/InboundEmail.php @@ -82,7 +82,7 @@ class InboundEmail extends RecordService implements public function findAccountForSending(string $emailAddress): ?InboundEmailEntity { - /** @var ?InboundEmailEntity */ + /** @var ?InboundEmailEntity $inboundEmail */ $inboundEmail = $this->entityManager ->getRDBRepository('InboundEmail') ->where([ @@ -109,7 +109,7 @@ class InboundEmail extends RecordService implements } if ($groupEmailAccountPermission === 'team') { - /** @var string[] */ + /** @var string[] $teamIdList */ $teamIdList = $user->getLinkMultipleIdList('teams'); if (!count($teamIdList)) { @@ -200,7 +200,7 @@ class InboundEmail extends RecordService implements */ public function applySmtpHandler(InboundEmailEntity $emailAccount, array &$params): void { - /** @var ?class-string */ + /** @var ?class-string $handlerClassName */ $handlerClassName = $emailAccount->get('smtpHandler'); if (!$handlerClassName) { diff --git a/application/Espo/Services/Language.php b/application/Espo/Services/Language.php index 3e31c852b8..a3d79a8294 100644 --- a/application/Espo/Services/Language.php +++ b/application/Espo/Services/Language.php @@ -122,7 +122,7 @@ class Language unset($data['Campaign']['presetFilters']); } else { - /** @var string[] */ + /** @var string[] $scopeList */ $scopeList = array_keys($this->metadata->get(['scopes'], [])); foreach ($scopeList as $scope) { diff --git a/application/Espo/Services/LastViewed.php b/application/Espo/Services/LastViewed.php index 97d3670504..a783e2916a 100644 --- a/application/Espo/Services/LastViewed.php +++ b/application/Espo/Services/LastViewed.php @@ -88,7 +88,7 @@ class LastViewed $offset = $params['offset'] ?? 0; $maxSize = $params['maxSize'] ?? 0; - /** @var \Espo\ORM\Collection<\Espo\Entities\ActionHistoryRecord> */ + /** @var \Espo\ORM\Collection<\Espo\Entities\ActionHistoryRecord> $collection */ $collection = $repository ->where([ 'userId' => $this->user->getId(), diff --git a/application/Espo/Services/Layout.php b/application/Espo/Services/Layout.php index ca3cecc10c..4234ab3c5c 100644 --- a/application/Espo/Services/Layout.php +++ b/application/Espo/Services/Layout.php @@ -119,7 +119,7 @@ class Layout $layout = $this->getRecordFromSet($scope, $name, $setId, true); if ($layout && $layout->get('data') !== null) { - /** @var string */ + /** @var string $data */ $data = $layout->get('data'); $result = Json::decode($data); diff --git a/application/Espo/Services/Metadata.php b/application/Espo/Services/Metadata.php index d34ef14eca..1a8fba8e2a 100644 --- a/application/Espo/Services/Metadata.php +++ b/application/Espo/Services/Metadata.php @@ -59,7 +59,7 @@ class Metadata return $data; } - /** @var string[] */ + /** @var string[] $scopeList */ $scopeList = array_keys($this->metadata->get(['entityDefs'], [])); foreach ($scopeList as $scope) { @@ -152,7 +152,7 @@ class Metadata unset($data->entityDefs->Settings); - /** @var string[] */ + /** @var string[] $dashletList */ $dashletList = array_keys($this->metadata->get(['dashlets'], [])); foreach ($dashletList as $item) { diff --git a/application/Espo/Services/Note.php b/application/Espo/Services/Note.php index 6b0f1bdaab..0eed998e8d 100644 --- a/application/Espo/Services/Note.php +++ b/application/Espo/Services/Note.php @@ -234,11 +234,11 @@ class Note extends Record $userTeamIdList = $this->user->getTeamIdList(); - /** @var string[] */ + /** @var string[] $userIdList */ $userIdList = $entity->getLinkMultipleIdList('users'); - /** @var string[] */ + /** @var string[] $portalIdList */ $portalIdList = $entity->getLinkMultipleIdList('portals'); - /** @var string[] */ + /** @var string[] $teamIdList */ $teamIdList = $entity->getLinkMultipleIdList('teams'); /** @var iterable $targetUserList */ diff --git a/application/Espo/Services/Notification.php b/application/Espo/Services/Notification.php index 5434cd3389..fc62806167 100644 --- a/application/Espo/Services/Notification.php +++ b/application/Espo/Services/Notification.php @@ -147,7 +147,7 @@ class Notification extends \Espo\Services\Record $query = $queryBuilder->build(); - /** @var \Espo\ORM\Collection<\Espo\Entities\Notification>> */ + /** @var \Espo\ORM\Collection<\Espo\Entities\Notification> $collection > */ $collection = $this->entityManager ->getRDBRepository('Notification') ->clone($query) diff --git a/application/Espo/Services/Preferences.php b/application/Espo/Services/Preferences.php index a5d1179c46..90d87c9b30 100644 --- a/application/Espo/Services/Preferences.php +++ b/application/Espo/Services/Preferences.php @@ -141,10 +141,10 @@ class Preferences unset($data->$attribute); } - /** @var ?User */ + /** @var ?User $user */ $user = $this->entityManager->getEntityById(User::ENTITY_TYPE, $userId); - /** @var ?PreferencesEntity */ + /** @var ?PreferencesEntity $entity */ $entity = $this->entityManager->getEntityById(PreferencesEntity::ENTITY_TYPE, $userId); if (!$entity || !$user) { diff --git a/application/Espo/Services/Settings.php b/application/Espo/Services/Settings.php index 18abe13e79..37445bec55 100644 --- a/application/Espo/Services/Settings.php +++ b/application/Espo/Services/Settings.php @@ -222,7 +222,7 @@ class Settings { $entityTypeListParamList = $this->metadata->get(['app', 'config', 'entityTypeListParamList']) ?? []; - /** @var string[] */ + /** @var string[] $scopeList */ $scopeList = array_keys($this->metadata->get(['entityDefs'], [])); foreach ($scopeList as $scope) { diff --git a/application/Espo/Services/Stream.php b/application/Espo/Services/Stream.php index a8d9ce33a2..dd554871b7 100644 --- a/application/Espo/Services/Stream.php +++ b/application/Espo/Services/Stream.php @@ -203,11 +203,11 @@ class Stream if (is_null($this->statusFields)) { $this->statusFields = []; - /** @var array> */ + /** @var array> $scopes */ $scopes = $this->metadata->get('scopes', []); foreach ($scopes as $scope => $data) { - /** @var ?string */ + /** @var ?string $statusField */ $statusField = $data['statusField'] ?? null; if (!$statusField) { @@ -1198,7 +1198,7 @@ class Stream ->limit($params['offset'] ?? 0, $params['maxSize']) ->order('number', 'DESC'); - /** @var iterable */ + /** @var iterable $collection */ $collection = $this->entityManager ->getRDBRepository(NoteEntity::ENTITY_TYPE) ->clone($builder->build()) @@ -1341,7 +1341,7 @@ class Stream return; } - /** @var NoteEntity */ + /** @var NoteEntity $note */ $note = $this->entityManager->getNewEntity(NoteEntity::ENTITY_TYPE); $note->set('type', NoteEntity::TYPE_EMAIL_RECEIVED); @@ -1394,7 +1394,7 @@ class Stream { $entityType = $entity->getEntityType(); - /** @var NoteEntity */ + /** @var NoteEntity $note */ $note = $this->entityManager->getNewEntity(NoteEntity::ENTITY_TYPE); $note->set('type', NoteEntity::TYPE_EMAIL_SENT); @@ -1458,7 +1458,7 @@ class Stream { $entityType = $entity->getEntityType(); - /** @var NoteEntity */ + /** @var NoteEntity $note */ $note = $this->entityManager->getNewEntity(NoteEntity::ENTITY_TYPE); $note->set('type', NoteEntity::TYPE_CREATE); @@ -1546,7 +1546,7 @@ class Stream array $options = [] ): void { - /** @var NoteEntity */ + /** @var NoteEntity $note */ $note = $this->entityManager->getNewEntity(NoteEntity::ENTITY_TYPE); $entityType = $entity->getEntityType(); @@ -1598,7 +1598,7 @@ class Stream return; } - /** @var NoteEntity */ + /** @var NoteEntity $note */ $note = $this->entityManager->getNewEntity(NoteEntity::ENTITY_TYPE); $note->set([ @@ -1625,7 +1625,7 @@ class Stream */ public function noteAssign(Entity $entity, array $options = []): void { - /** @var NoteEntity */ + /** @var NoteEntity $note */ $note = $this->entityManager->getNewEntity(NoteEntity::ENTITY_TYPE); $note->set('type', NoteEntity::TYPE_ASSIGN); @@ -1673,7 +1673,7 @@ class Stream */ public function noteStatus(Entity $entity, string $field, array $options = []): void { - /** @var NoteEntity */ + /** @var NoteEntity $note */ $note = $this->entityManager->getNewEntity(NoteEntity::ENTITY_TYPE); $note->set('type', NoteEntity::TYPE_STATUS); @@ -1732,7 +1732,7 @@ class Stream return $this->auditedFieldsCache[$entityType]; } - /** @var array> */ + /** @var array> $fields */ $fields = $this->metadata->get('entityDefs.' . $entityType . '.fields'); $auditedFields = []; @@ -1746,7 +1746,7 @@ class Stream continue; } - /** @var ?string */ + /** @var ?string $type */ $type = $defs['type'] ?? null; if (!$type) { @@ -1839,7 +1839,7 @@ class Stream return; } - /** @var NoteEntity */ + /** @var NoteEntity $note */ $note = $this->entityManager->getNewEntity(NoteEntity::ENTITY_TYPE); $note->set('type', NoteEntity::TYPE_UPDATE); @@ -1917,7 +1917,7 @@ class Stream $query = $builder->build(); - /** @var \Espo\ORM\Collection */ + /** @var \Espo\ORM\Collection $collection */ $collection = $this->entityManager ->getRDBRepository(User::ENTITY_TYPE) ->clone($query) @@ -1978,7 +1978,7 @@ class Stream ]; foreach ($userList as $user) { - /** @var string */ + /** @var string $id */ $id = $user->getId(); $data['idList'][] = $id; @@ -2236,7 +2236,7 @@ class Stream $ownerUserField = $this->aclManager->getReadOwnerUserField($entityType); - /* @var \Espo\ORM\Defs\EntityDefs */ + /* @var \Espo\ORM\Defs\EntityDefs $defs */ $defs = $this->entityManager->getDefs()->getEntity($entity->getEntityType()); $userIdList = []; diff --git a/application/Espo/Services/Webhook.php b/application/Espo/Services/Webhook.php index 8530dda618..e367f53c3d 100644 --- a/application/Espo/Services/Webhook.php +++ b/application/Espo/Services/Webhook.php @@ -135,7 +135,7 @@ class Webhook extends Record implements return; } - /** @var User|null */ + /** @var User|null $user */ $user = $this->getEntityManager()->getEntity('User', $userId); if (!$user || !$user->isApi()) { diff --git a/application/Espo/Tools/EmailNotification/Processor.php b/application/Espo/Tools/EmailNotification/Processor.php index 1a0dee1239..d27adfe2f5 100644 --- a/application/Espo/Tools/EmailNotification/Processor.php +++ b/application/Espo/Tools/EmailNotification/Processor.php @@ -463,7 +463,7 @@ class Processor if (!array_key_exists($key, $this->emailNotificationEntityHandlerHash)) { $this->emailNotificationEntityHandlerHash[$key] = null; - /** @var ?class-string */ + /** @var ?class-string $className */ $className = $this->metadata ->get(['notificationDefs', $entityType, 'emailNotificationHandlerClassNameMap', $type]); @@ -600,7 +600,7 @@ class Processor if (!array_key_exists($user->getId(), $this->userIdPortalCacheMap)) { $this->userIdPortalCacheMap[$user->getId()] = null; - /** @var string[] */ + /** @var string[] $portalIdList */ $portalIdList = $user->getLinkMultipleIdList('portals'); $defaultPortalId = $this->config->get('defaultPortalId'); diff --git a/application/Espo/Tools/EntityManager/EntityManager.php b/application/Espo/Tools/EntityManager/EntityManager.php index d25f8d2a70..851f74916a 100644 --- a/application/Espo/Tools/EntityManager/EntityManager.php +++ b/application/Espo/Tools/EntityManager/EntityManager.php @@ -254,7 +254,7 @@ class EntityManager continue; } - /** @var string */ + /** @var string $languageContents */ $languageContents = $this->fileManager->getContents($filePath); $languageContents = str_replace('{entityType}', $name, $languageContents); @@ -376,7 +376,7 @@ class EntityManager return; } - /** @var string */ + /** @var string $contents */ $contents = $this->fileManager->getContents($path); $data = Json::decode($contents, true); @@ -392,7 +392,7 @@ class EntityManager return; } - /** @var string */ + /** @var string $contents */ $contents = $this->fileManager->getContents($path); $data = Json::decode($contents, true); @@ -1672,7 +1672,7 @@ class EntityManager $toCreateList[] = $foreignEntityType; } - /** @var string[] */ + /** @var string[] $entityTypeList */ $entityTypeList = array_keys($this->metadata->get('entityDefs') ?? []); foreach ($entityTypeList as $itemEntityType) { diff --git a/application/Espo/Tools/EntityManager/Link/HookProcessor.php b/application/Espo/Tools/EntityManager/Link/HookProcessor.php index 825b4c2aca..12d40be2de 100644 --- a/application/Espo/Tools/EntityManager/Link/HookProcessor.php +++ b/application/Espo/Tools/EntityManager/Link/HookProcessor.php @@ -63,7 +63,7 @@ class HookProcessor */ private function getCreateHookList(): array { - /** @var class-string[] */ + /** @var class-string[] $classNameList */ $classNameList = $this->metadata->get(['app', 'linkManager', 'createHookClassNameList']) ?? []; $list = []; @@ -80,7 +80,7 @@ class HookProcessor */ private function getDeleteHookList(): array { - /** @var class-string[] */ + /** @var class-string[] $classNameList */ $classNameList = $this->metadata->get(['app', 'linkManager', 'deleteHookClassNameList']) ?? []; $list = []; diff --git a/application/Espo/Tools/EntityManager/NameUtil.php b/application/Espo/Tools/EntityManager/NameUtil.php index e21242ef77..3d86ec61f7 100644 --- a/application/Espo/Tools/EntityManager/NameUtil.php +++ b/application/Espo/Tools/EntityManager/NameUtil.php @@ -202,7 +202,7 @@ class NameUtil public function relationshipExists(string $name): bool { - /** @var string[] */ + /** @var string[] $scopeList */ $scopeList = array_keys($this->metadata->get(['scopes'], [])); foreach ($scopeList as $entityType) { diff --git a/application/Espo/Tools/EntityManager/Rename/Renamer.php b/application/Espo/Tools/EntityManager/Rename/Renamer.php index 80ebe9f262..23e80ac063 100644 --- a/application/Espo/Tools/EntityManager/Rename/Renamer.php +++ b/application/Espo/Tools/EntityManager/Rename/Renamer.php @@ -422,11 +422,11 @@ class Renamer private function renameInConfig(string $entityType, string $newName): void { - /** @var string[] */ + /** @var string[] $entityTypeListParamList */ $entityTypeListParamList = $this->metadata->get(['app', 'config', 'entityTypeListParamList']) ?? []; foreach ($entityTypeListParamList as $param) { - /** @var ?string[] */ + /** @var ?string[] $list */ $list = $this->config->get($param); if ($list === null) { @@ -449,7 +449,7 @@ class Renamer private function renameInRelationships(string $entityType, string $newName): void { - /** @var string[] */ + /** @var string[] $entityTypeList */ $entityTypeList = array_keys($this->metadata->get(['entityDefs']) ?? []); foreach ($entityTypeList as $itemEntityType) { @@ -461,7 +461,7 @@ class Renamer private function renameInRelationshipsEntity(string $entityType, string $fromEntityType, string $toEntityType): void { - /** @var array> */ + /** @var array> $linkDefs */ $linkDefs = $this->metadata->get(['entityDefs', $entityType, 'links']) ?? []; foreach ($linkDefs as $link => $defs) { @@ -512,7 +512,7 @@ class Renamer private function renameInLinkParentField(string $entityType, string $field, string $from, string $to): void { - /** @var string[] */ + /** @var string[] $list */ $list = $this->metadata->get(['entityDefs', $entityType, 'fields', $field, 'entityList']) ?? []; $index = array_search($from, $list, true); @@ -627,9 +627,9 @@ class Renamer ->find(); foreach ($roleList as $role) { - /** @var \stdClass */ + /** @var \stdClass $data */ $data = $role->get('data'); - /** @var \stdClass */ + /** @var \stdClass $fieldData */ $fieldData = $role->get('fieldData'); if (isset($data->$from)) { @@ -652,9 +652,9 @@ class Renamer ->find(); foreach ($portalRoleList as $role) { - /** @var \stdClass */ + /** @var \stdClass $data */ $data = $role->get('data'); - /** @var \stdClass */ + /** @var \stdClass $fieldData */ $fieldData = $role->get('fieldData'); if (isset($data->$from)) { diff --git a/application/Espo/Tools/Export/ProcessorFactory.php b/application/Espo/Tools/Export/ProcessorFactory.php index 17295382ac..a96800af80 100644 --- a/application/Espo/Tools/Export/ProcessorFactory.php +++ b/application/Espo/Tools/Export/ProcessorFactory.php @@ -54,7 +54,7 @@ class ProcessorFactory throw new LogicException("Not supported export format '{$format}'."); } - /** @var ?class-string */ + /** @var ?class-string $className */ $className = $this->metadata->get(['app', 'export', 'processorClassNameMap', $format]); if (!$className) { diff --git a/application/Espo/Tools/FieldManager/FieldManager.php b/application/Espo/Tools/FieldManager/FieldManager.php index c02fe4dc95..097328163a 100644 --- a/application/Espo/Tools/FieldManager/FieldManager.php +++ b/application/Espo/Tools/FieldManager/FieldManager.php @@ -848,7 +848,7 @@ class FieldManager protected function getHook(string $type): ?object { - /** @var ?class-string */ + /** @var ?class-string $className */ $className = $this->metadata->get(['fields', $type, 'hookClassName']); if (!$className) { diff --git a/application/Espo/Tools/Formula/Service.php b/application/Espo/Tools/Formula/Service.php index 04d1ab49a1..74373f770d 100644 --- a/application/Espo/Tools/Formula/Service.php +++ b/application/Espo/Tools/Formula/Service.php @@ -74,7 +74,7 @@ class Service $syntaxCheckResult = $this->checkSyntax($expression); if (!$syntaxCheckResult->isSuccess()) { - /** @var SyntaxError */ + /** @var SyntaxError $exception */ $exception = $syntaxCheckResult->getException(); return RunResult::createSyntaxError($exception); diff --git a/application/Espo/Tools/Import/Import.php b/application/Espo/Tools/Import/Import.php index b7318fac10..ff8760f007 100644 --- a/application/Espo/Tools/Import/Import.php +++ b/application/Espo/Tools/Import/Import.php @@ -254,7 +254,7 @@ class Import } } - /** @var ?Attachment */ + /** @var ?Attachment $attachment */ $attachment = $this->entityManager->getEntityById(Attachment::ENTITY_TYPE, $this->attachmentId); if (!$attachment) { @@ -270,7 +270,7 @@ class Import $startFromIndex = null; if ($this->id) { - /** @var ?ImportEntity */ + /** @var ?ImportEntity $import */ $import = $this->entityManager->getEntityById(ImportEntity::ENTITY_TYPE, $this->id); if (!$import) { @@ -284,7 +284,7 @@ class Import $import->set('status', ImportEntity::STATUS_IN_PROCESS); } else { - /** @var ImportEntity */ + /** @var ImportEntity $import */ $import = $this->entityManager->getNewEntity(ImportEntity::ENTITY_TYPE); $import->set([ @@ -929,7 +929,7 @@ class Import { $params = $this->params; - /** @var non-empty-string */ + /** @var non-empty-string $decimalMark */ $decimalMark = $params->getDecimalMark() ?? self::DEFAULT_DECIMAL_MARK; $dateFormat = DateTimeUtil::convertFormatToSystem( diff --git a/application/Espo/Tools/Import/Jobs/RunIdle.php b/application/Espo/Tools/Import/Jobs/RunIdle.php index 973929d098..243ec8d483 100644 --- a/application/Espo/Tools/Import/Jobs/RunIdle.php +++ b/application/Espo/Tools/Import/Jobs/RunIdle.php @@ -68,7 +68,7 @@ class RunIdle implements Job $params = ImportParams::fromRaw($raw->params); - /** @var ?User */ + /** @var ?User $user */ $user = $this->entityManager->getEntityById(User::ENTITY_TYPE, $userId); if (!$user) { diff --git a/application/Espo/Tools/Import/Service.php b/application/Espo/Tools/Import/Service.php index 0564a84215..12f65e53dc 100644 --- a/application/Espo/Tools/Import/Service.php +++ b/application/Espo/Tools/Import/Service.php @@ -437,7 +437,7 @@ class Service $stream = Psr7Utils::streamFor($resource); - /** @var Collection */ + /** @var Collection $errorList */ $errorList = $this->entityManager ->getRDBRepositoryByClass(ImportEntity::class) ->getRelation($import, 'errors') @@ -449,7 +449,7 @@ class Service if ($import->getParams()->headerRow()) { $file->seek(0); - /** @var string|false */ + /** @var string|false $line */ $line = $file->current(); if ($line === false) { @@ -462,7 +462,7 @@ class Service foreach ($errorList as $error) { $file->seek($error->getRowIndex()); - /** @var string|false */ + /** @var string|false $line */ $line = $file->current(); if ($line === false) { diff --git a/application/Espo/Tools/LeadCapture/LeadCapture.php b/application/Espo/Tools/LeadCapture/LeadCapture.php index 672f7198f5..c515dd9f24 100644 --- a/application/Espo/Tools/LeadCapture/LeadCapture.php +++ b/application/Espo/Tools/LeadCapture/LeadCapture.php @@ -123,7 +123,7 @@ class LeadCapture */ public function capture(string $apiKey, stdClass $data): void { - /** @var ?LeadCaptureEntity */ + /** @var ?LeadCaptureEntity $leadCapture */ $leadCapture = $this->entityManager ->getRDBRepository(LeadCaptureEntity::ENTITY_TYPE) ->where([ @@ -206,7 +206,7 @@ class LeadCapture $terminateAt = $dt->format(DateTimeUtil::SYSTEM_DATE_TIME_FORMAT); - /** @var UniqueId */ + /** @var UniqueId $uniqueId */ $uniqueId = $this->entityManager->getNewEntity(UniqueId::ENTITY_TYPE); $uniqueId->set([ @@ -244,7 +244,7 @@ class LeadCapture ): void { if ($leadId) { - /** @var ?Lead */ + /** @var ?Lead $lead */ $lead = $this->entityManager->getEntityById(Lead::ENTITY_TYPE, $leadId); if (!$lead) { @@ -257,7 +257,7 @@ class LeadCapture $campaign = null; - /** @var ?string */ + /** @var ?string $campaignId */ $campaignId = $leadCapture->getCampaignId(); if ($campaignId) { @@ -440,7 +440,7 @@ class LeadCapture */ public function confirmOptIn(string $id): array { - /** @var ?UniqueId */ + /** @var ?UniqueId $uniqueId */ $uniqueId = $this->entityManager ->getRDBRepository(UniqueId::ENTITY_TYPE) ->where(['name' => $id]) @@ -475,7 +475,7 @@ class LeadCapture ]; } - /** @var ?LeadCaptureEntity */ + /** @var ?LeadCaptureEntity $leadCapture */ $leadCapture = $this->entityManager->getEntityById(LeadCaptureEntity::ENTITY_TYPE, $leadCaptureId); if (!$leadCapture) { @@ -508,7 +508,7 @@ class LeadCapture */ public function sendOptInConfirmation(string $id): void { - /** @var ?UniqueId */ + /** @var ?UniqueId $uniqueId */ $uniqueId = $this->entityManager ->getRDBRepository(UniqueId::ENTITY_TYPE) ->where([ @@ -540,7 +540,7 @@ class LeadCapture throw new Error("LeadCapture: Opt-in confirmation expired."); } - /** @var ?LeadCaptureEntity */ + /** @var ?LeadCaptureEntity $leadCapture */ $leadCapture = $this->entityManager->getEntity(LeadCaptureEntity::ENTITY_TYPE, $leadCaptureId); if (!$leadCapture) { @@ -553,7 +553,7 @@ class LeadCapture throw new Error("LeadCapture: No optInConfirmationEmailTemplateId."); } - /** @var ?EmailTemplate */ + /** @var ?EmailTemplate $emailTemplate */ $emailTemplate = $this->entityManager ->getEntityById(EmailTemplate::ENTITY_TYPE, $optInConfirmationEmailTemplateId); @@ -562,7 +562,7 @@ class LeadCapture } if ($leadId) { - /** @var ?Lead */ + /** @var ?Lead $lead */ $lead = $this->entityManager->getEntityById(Lead::ENTITY_TYPE, $leadId); } else { @@ -621,7 +621,7 @@ class LeadCapture $body = str_replace('{optInDateTime}', $dateTimeString, $body); } - /** @var Email */ + /** @var Email $email */ $email = $this->entityManager->getNewEntity(Email::ENTITY_TYPE); $email->set([ @@ -636,7 +636,7 @@ class LeadCapture $inboundEmailId = $leadCapture->getInboundEmailId(); if ($inboundEmailId) { - /** @var ?InboundEmail */ + /** @var ?InboundEmail $inboundEmail */ $inboundEmail = $this->entityManager->getEntityById(InboundEmail::ENTITY_TYPE, $inboundEmailId); if (!$inboundEmail) { @@ -669,7 +669,7 @@ class LeadCapture */ protected function getLeadWithPopulatedData(LeadCaptureEntity $leadCapture, stdClass $data): Lead { - /** @var Lead */ + /** @var Lead $lead */ $lead = $this->entityManager->getNewEntity(Lead::ENTITY_TYPE); $fieldList = $leadCapture->getFieldList(); diff --git a/application/Espo/Tools/Notification/NoteHookProcessor.php b/application/Espo/Tools/Notification/NoteHookProcessor.php index 79c0239be2..1d67ecc004 100644 --- a/application/Espo/Tools/Notification/NoteHookProcessor.php +++ b/application/Espo/Tools/Notification/NoteHookProcessor.php @@ -133,9 +133,9 @@ class NoteHookProcessor $userIdList = null; if (!$skipAclCheck) { - /** @var string[] */ + /** @var string[] $teamIdList */ $teamIdList = $note->getLinkMultipleIdList('teams'); - /** @var string[] */ + /** @var string[] $userIdList */ $userIdList = $note->getLinkMultipleIdList('users'); } @@ -396,7 +396,7 @@ class NoteHookProcessor return false; } - /** @var string[] */ + /** @var string[] $userTeamIdList */ $userTeamIdList = $user->getLinkMultipleIdList('teams'); foreach ($teamIdList as $teamId) { @@ -433,7 +433,7 @@ class NoteHookProcessor ->createFromSthCollection($collection); } - /** @var EntityCollection */ + /** @var EntityCollection $newCollection */ $newCollection = $this->entityManager ->getCollectionFactory() ->create(User::ENTITY_TYPE); diff --git a/application/Espo/Tools/Pdf/Data/DataLoaderManager.php b/application/Espo/Tools/Pdf/Data/DataLoaderManager.php index befb38a72b..52611d772e 100644 --- a/application/Espo/Tools/Pdf/Data/DataLoaderManager.php +++ b/application/Espo/Tools/Pdf/Data/DataLoaderManager.php @@ -59,7 +59,7 @@ class DataLoaderManager $data = Data::create(); } - /** @var class-string[] */ + /** @var class-string[] $classNameList */ $classNameList = $this->metadata->get(['pdfDefs', $entity->getEntityType(), 'dataLoaderClassNameList']) ?? []; foreach ($classNameList as $className) { diff --git a/application/Espo/Tools/Pdf/PrinterController.php b/application/Espo/Tools/Pdf/PrinterController.php index 8a7e6b83de..0613c35ba1 100644 --- a/application/Espo/Tools/Pdf/PrinterController.php +++ b/application/Espo/Tools/Pdf/PrinterController.php @@ -88,7 +88,7 @@ class PrinterController */ private function createEntityPrinter(): EntityPrinter { - /** @var ?class-string */ + /** @var ?class-string $className */ $className = $this->metadata ->get(['app', 'pdfEngines', $this->engine, 'implementationClassNameMap', 'entity']) ?? null; @@ -104,7 +104,7 @@ class PrinterController */ private function createCollectionPrinter(): CollectionPrinter { - /** @var ?class-string */ + /** @var ?class-string $className */ $className = $this->metadata ->get(['app', 'pdfEngines', $this->engine, 'implementationClassNameMap', 'collection']) ?? null; diff --git a/application/Espo/Tools/Pdf/Tcpdf/Tcpdf.php b/application/Espo/Tools/Pdf/Tcpdf/Tcpdf.php index a89170f04f..afc5ce30cb 100644 --- a/application/Espo/Tools/Pdf/Tcpdf/Tcpdf.php +++ b/application/Espo/Tools/Pdf/Tcpdf/Tcpdf.php @@ -192,7 +192,7 @@ class Tcpdf extends TcpdfOriginal if ($this->state < 3) { $this->Close(); } - /** @var string */ + /** @var string $name */ $name = preg_replace('/[\s]+/', '_', $name); $name = Util::sanitizeFileName($name); diff --git a/application/Espo/Tools/Stream/HookProcessor.php b/application/Espo/Tools/Stream/HookProcessor.php index e7d10ff6c2..f9f9642373 100644 --- a/application/Espo/Tools/Stream/HookProcessor.php +++ b/application/Espo/Tools/Stream/HookProcessor.php @@ -379,7 +379,7 @@ class HookProcessor $assignedUserId = $entity->get('assignedUserId'); $createdById = $entity->get('createdById'); - /** @var string[] */ + /** @var string[] $assignedUserIdList */ $assignedUserIdList = $hasAssignedUsersField ? $entity->getLinkMultipleIdList('assignedUsers') : []; if ( @@ -472,7 +472,7 @@ class HookProcessor return; } - /** @var string[] */ + /** @var string[] $assignedUserIdList */ $assignedUserIdList = $entity->getLinkMultipleIdList('assignedUsers'); $fetchedAssignedUserIdList = $entity->getFetched('assignedUsersIds') ?? []; @@ -552,7 +552,7 @@ class HookProcessor if (is_null($this->statusFields)) { $this->statusFields = []; - /** @var array> */ + /** @var array> $scopes */ $scopes = $this->metadata->get('scopes', []); foreach ($scopes as $scope => $data) { diff --git a/application/Espo/Tools/Stream/Jobs/AutoFollow.php b/application/Espo/Tools/Stream/Jobs/AutoFollow.php index 0ed71e89fa..14205d93d3 100644 --- a/application/Espo/Tools/Stream/Jobs/AutoFollow.php +++ b/application/Espo/Tools/Stream/Jobs/AutoFollow.php @@ -84,7 +84,7 @@ class AutoFollow implements Job } foreach ($userIdList as $i => $userId) { - /** @var User|null */ + /** @var User|null $user */ $user = $this->entityManager->getEntity('User', $userId); if (!$user) { @@ -121,7 +121,7 @@ class AutoFollow implements Job $this->service->followEntityMass($entity, $userIdList); - /** @var iterable<\Espo\Entities\Note> */ + /** @var iterable<\Espo\Entities\Note> $noteList */ $noteList = $this->entityManager ->getRDBRepository('Note') ->where([ diff --git a/application/Espo/Tools/Stream/Jobs/ControlFollowers.php b/application/Espo/Tools/Stream/Jobs/ControlFollowers.php index b64cc1379d..6848228676 100644 --- a/application/Espo/Tools/Stream/Jobs/ControlFollowers.php +++ b/application/Espo/Tools/Stream/Jobs/ControlFollowers.php @@ -86,7 +86,7 @@ class ControlFollowers implements Job ->find(); foreach ($userList as $user) { - /** @var string */ + /** @var string $userId */ $userId = $user->getId(); if (!$user->isActive()) {