mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
type fixes
This commit is contained in:
@@ -224,6 +224,9 @@ class Service implements Crud,
|
||||
$this->entityType = $entityType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @phpstan-return RDBRepository<TEntity>
|
||||
*/
|
||||
protected function getRepository(): RDBRepository
|
||||
{
|
||||
return $this->entityManager->getRDBRepository($this->entityType);
|
||||
@@ -288,6 +291,8 @@ class Service implements Crud,
|
||||
* Get an entity by ID. Access control check is performed.
|
||||
*
|
||||
* @throws ForbiddenSilent If no read access.
|
||||
*
|
||||
* @phpstan-return TEntity|null
|
||||
*/
|
||||
public function getEntity(string $id): ?Entity
|
||||
{
|
||||
@@ -820,9 +825,13 @@ class Service implements Crud,
|
||||
return $this->injectableFactory->create(ApplierClassNameListProvider::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @phpstan-return TEntity|null
|
||||
*/
|
||||
protected function getEntityEvenDeleted(string $id): ?Entity
|
||||
{
|
||||
$query = $this->entityManager->getQueryBuilder()
|
||||
$query = $this->entityManager
|
||||
->getQueryBuilder()
|
||||
->select()
|
||||
->from($this->entityType)
|
||||
->where([
|
||||
|
||||
@@ -732,6 +732,7 @@ class RDBRepository implements Repository
|
||||
throw new RuntimeException("Can't clone a query of a different entity type.");
|
||||
}
|
||||
|
||||
/** @var RDBSelectBuilder<TEntity> */
|
||||
$builder = new RDBSelectBuilder($this->entityManager, $this->entityType, $query);
|
||||
|
||||
return $builder;
|
||||
@@ -892,6 +893,8 @@ class RDBRepository implements Repository
|
||||
* * `groupBy([$expr1, $expr2, ...])`
|
||||
*
|
||||
* @param Expression|Expression[]|string|string[] $groupBy
|
||||
*
|
||||
* @phpstan-return RDBSelectBuilder<TEntity>
|
||||
*/
|
||||
public function group($groupBy): RDBSelectBuilder
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user