type fixes
This commit is contained in:
@@ -50,7 +50,7 @@ use Espo\Core\{
|
||||
};
|
||||
|
||||
/**
|
||||
* @template T of \Espo\Core\ORM\Entity
|
||||
* @template T of \Espo\ORM\Entity
|
||||
* @extends RDBRepository<T>
|
||||
*/
|
||||
class Database extends RDBRepository
|
||||
|
||||
@@ -40,6 +40,9 @@ use DateTime;
|
||||
use DateTimeZone;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* @extends Database<\Espo\Core\ORM\Entity>
|
||||
*/
|
||||
class Event extends Database implements
|
||||
|
||||
Di\DateTimeAware,
|
||||
|
||||
@@ -118,7 +118,7 @@ class Order
|
||||
else if ($order === false || strtolower($order) === 'asc') {
|
||||
$order = SearchParams::ORDER_ASC;
|
||||
}
|
||||
else if (!$order === null) {
|
||||
else if ($order !== null) {
|
||||
throw new Error("Bad default order.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class EnumType implements ItemConverter
|
||||
'entityDefs', $this->entityType, 'fields', $orderBy, 'options'
|
||||
]);
|
||||
|
||||
if (!$list || !is_array($list) || !count($list)) {
|
||||
if (!is_array($list) || !count($list)) {
|
||||
return OrderList::create([
|
||||
Order::fromString($orderBy)->withDirection($order)
|
||||
]);
|
||||
|
||||
@@ -67,7 +67,7 @@ class SelectBuilder
|
||||
private $sourceQuery = null;
|
||||
|
||||
/**
|
||||
* @var SearchParams
|
||||
* @var SearchParams|null
|
||||
*/
|
||||
private $searchParams = null;
|
||||
|
||||
|
||||
@@ -67,10 +67,6 @@ class DateTimeItemTransformer
|
||||
throw new Error("Bad where item.");
|
||||
}
|
||||
|
||||
if ($attribute && !is_string($attribute)) {
|
||||
throw new Error("Bad 'attribute' in where item.");
|
||||
}
|
||||
|
||||
if (!$attribute) {
|
||||
throw new Error("Bad datetime where item. Empty 'attribute'.");
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ class Import extends Database
|
||||
'ImportEntity',
|
||||
'importEntity',
|
||||
[
|
||||
'importEntity.importId' => $entity->id,
|
||||
'importEntity.importId' => $entity->getId(),
|
||||
'importEntity.entityType' => $entityType,
|
||||
'importEntity.entityId:' => 'id',
|
||||
'importEntity.' . $param => true,
|
||||
@@ -131,7 +131,7 @@ class Import extends Database
|
||||
->delete()
|
||||
->from('ImportEntity')
|
||||
->where([
|
||||
'importId' => $entity->id,
|
||||
'importId' => $entity->getId(),
|
||||
])
|
||||
->build();
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class ScheduledJob extends \Espo\Core\Repositories\Database
|
||||
$jobList = $this->entityManager
|
||||
->getRDBRepository('Job')
|
||||
->where([
|
||||
'scheduledJobId' => $entity->id,
|
||||
'scheduledJobId' => $entity->getId(),
|
||||
'status' => Status::PENDING,
|
||||
])
|
||||
->find();
|
||||
|
||||
Reference in New Issue
Block a user