const ID usage

This commit is contained in:
Yuri Kuznetsov
2024-11-11 17:41:22 +02:00
parent 0531b7239c
commit 6d1c4d2aa8
85 changed files with 252 additions and 173 deletions
@@ -36,6 +36,7 @@ use Espo\Core\FieldProcessing\Loader;
use Espo\Core\FieldProcessing\Loader\Params;
use Espo\Core\ORM\EntityManager;
use Espo\ORM\Name\Attribute;
use stdClass;
/**
@@ -77,9 +78,9 @@ class PhoneNumberMapLoader implements Loader
$entityList = $this->entityManager
->getRDBRepository($entityType)
->where([
'id' => $idList,
Attribute::ID => $idList,
])
->select(['id', 'phoneNumber'])
->select([Attribute::ID, 'phoneNumber'])
->find();
foreach ($entityList as $entity) {
@@ -89,7 +90,7 @@ class PhoneNumberMapLoader implements Loader
continue;
}
if (strpos($phoneNumber, self::ERASED_PART) === 0) {
if (str_starts_with($phoneNumber, self::ERASED_PART)) {
continue;
}