mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
type fixes
This commit is contained in:
@@ -99,6 +99,7 @@ class JobRunner
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
/** @var JobEntity $jobEntity */
|
||||
$jobEntity = $this->entityManager->getEntity(JobEntity::ENTITY_TYPE, $id);
|
||||
|
||||
if (!$jobEntity) {
|
||||
|
||||
@@ -86,9 +86,8 @@ class ScheduleUtil
|
||||
$runTime = date(DateTimeUtil::SYSTEM_DATE_TIME_FORMAT);
|
||||
}
|
||||
|
||||
$entityManager = $this->entityManager;
|
||||
|
||||
$scheduledJob = $entityManager->getEntity(ScheduledJobEntity::ENTITY_TYPE, $scheduledJobId);
|
||||
/** @var ScheduledJobEntity $scheduledJob */
|
||||
$scheduledJob = $this->entityManager->getEntity(ScheduledJobEntity::ENTITY_TYPE, $scheduledJobId);
|
||||
|
||||
if (!$scheduledJob) {
|
||||
return;
|
||||
@@ -96,9 +95,9 @@ class ScheduleUtil
|
||||
|
||||
$scheduledJob->set('lastRun', $runTime);
|
||||
|
||||
$entityManager->saveEntity($scheduledJob, ['silent' => true]);
|
||||
$this->entityManager->saveEntity($scheduledJob, ['silent' => true]);
|
||||
|
||||
$scheduledJobLog = $entityManager->getEntity(ScheduledJobLogRecordEntity::ENTITY_TYPE);
|
||||
$scheduledJobLog = $this->entityManager->getEntity(ScheduledJobLogRecordEntity::ENTITY_TYPE);
|
||||
|
||||
$scheduledJobLog->set([
|
||||
'scheduledJobId' => $scheduledJobId,
|
||||
@@ -109,6 +108,6 @@ class ScheduleUtil
|
||||
'targetType' => $targetType,
|
||||
]);
|
||||
|
||||
$entityManager->saveEntity($scheduledJobLog);
|
||||
$this->entityManager->saveEntity($scheduledJobLog);
|
||||
}
|
||||
}
|
||||
@@ -170,7 +170,7 @@ class EmailSender
|
||||
|
||||
if (!$this->systemInboundEmailIsCached && $address) {
|
||||
$this->systemInboundEmail = $this->entityManager
|
||||
->getRepository('InboundEmail')
|
||||
->getRDBRepository('InboundEmail')
|
||||
->where([
|
||||
'status' => 'Active',
|
||||
'useSmtp' => true,
|
||||
|
||||
@@ -29,11 +29,10 @@
|
||||
|
||||
namespace Espo\Core\Record;
|
||||
|
||||
use Espo\ORM\{
|
||||
Collection as OrmCollection,
|
||||
};
|
||||
use Espo\ORM\Collection as OrmCollection;
|
||||
use Espo\ORM\EntityCollection;
|
||||
|
||||
use StdClass;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Contains an an ORM collection and total number of records.
|
||||
@@ -73,11 +72,14 @@ class Collection
|
||||
/**
|
||||
* Get a value map list.
|
||||
*
|
||||
* @return StdClass[]
|
||||
* @return stdClass[]
|
||||
*/
|
||||
public function getValueMapList(): array
|
||||
{
|
||||
if (!$this->collection->getEntityType()) {
|
||||
if (
|
||||
$this->collection instanceof EntityCollection &&
|
||||
!$this->collection->getEntityType()
|
||||
) {
|
||||
$list = [];
|
||||
|
||||
foreach ($this->collection as $e) {
|
||||
|
||||
@@ -164,7 +164,7 @@ class Config
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Since v6.2.0.
|
||||
* @deprecated Since v7.0.
|
||||
*/
|
||||
public function set($name, $value = null, bool $dontMarkDirty = false)
|
||||
{
|
||||
@@ -190,7 +190,7 @@ class Config
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Since v6.2.0.
|
||||
* @deprecated Since v7.0.
|
||||
*/
|
||||
public function remove(string $name): bool
|
||||
{
|
||||
@@ -206,7 +206,7 @@ class Config
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Since v6.2.0.
|
||||
* @deprecated Since v7.0.
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
@@ -253,24 +253,14 @@ class Config
|
||||
|
||||
$data['microtime'] = $microtime = microtime(true);
|
||||
|
||||
$result = $this->fileManager->putPhpContents($configPath, $data, true);
|
||||
$this->fileManager->putPhpContents($configPath, $data);
|
||||
|
||||
if ($result) {
|
||||
$reloadedData = include($configPath);
|
||||
$this->changedData = [];
|
||||
$this->removeData = [];
|
||||
|
||||
if (!is_array($reloadedData) || $microtime !== ($reloadedData['microtime'] ?? null)) {
|
||||
$result = $this->fileManager->putPhpContents($configPath, $data, false);
|
||||
}
|
||||
}
|
||||
$this->load();
|
||||
|
||||
if ($result) {
|
||||
$this->changedData = [];
|
||||
$this->removeData = [];
|
||||
|
||||
$this->load();
|
||||
}
|
||||
|
||||
return $result;
|
||||
return true;
|
||||
}
|
||||
|
||||
private function isLoaded(): bool
|
||||
|
||||
@@ -228,7 +228,6 @@ class SystemRequirements
|
||||
$actualValue = $this->systemHelper->getPhpParam($name);
|
||||
|
||||
$acceptable = (
|
||||
isset($actualValue) &&
|
||||
Util::convertToByte($actualValue) >= Util::convertToByte($requiredValue)
|
||||
) ? true : false;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
parameters:
|
||||
level: 1
|
||||
inferPrivatePropertyTypeFromConstructor: true
|
||||
paths:
|
||||
- application
|
||||
reportUnmatchedIgnoredErrors: false
|
||||
|
||||
Reference in New Issue
Block a user