mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
type fixes
This commit is contained in:
@@ -58,6 +58,10 @@ class Person extends Entity
|
||||
$this->helper = $helper;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
* @return void
|
||||
*/
|
||||
protected function _setLastName($value)
|
||||
{
|
||||
$this->setInContainer('lastName', $value);
|
||||
@@ -67,6 +71,10 @@ class Person extends Entity
|
||||
$this->setInContainer('name', $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
* @return void
|
||||
*/
|
||||
protected function _setFirstName($value)
|
||||
{
|
||||
$this->setInContainer('firstName', $value);
|
||||
@@ -76,6 +84,10 @@ class Person extends Entity
|
||||
$this->setInContainer('name', $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
* @return void
|
||||
*/
|
||||
protected function _setMiddleName($value)
|
||||
{
|
||||
$this->setInContainer('middleName', $value);
|
||||
|
||||
@@ -43,9 +43,9 @@ use Espo\Core\{
|
||||
*/
|
||||
class EntryPointManager
|
||||
{
|
||||
private $injectableFactory;
|
||||
private InjectableFactory $injectableFactory;
|
||||
|
||||
private $classFinder;
|
||||
private ClassFinder $classFinder;
|
||||
|
||||
public function __construct(InjectableFactory $injectableFactory, ClassFinder $classFinder)
|
||||
{
|
||||
@@ -86,7 +86,7 @@ class EntryPointManager
|
||||
return $className::$notStrictAuth ?? false;
|
||||
}
|
||||
|
||||
public function run(string $name, Request $request, Response $response)
|
||||
public function run(string $name, Request $request, Response $response): void
|
||||
{
|
||||
$className = $this->getClassName($name);
|
||||
|
||||
@@ -99,6 +99,9 @@ class EntryPointManager
|
||||
$entryPoint->run($request, $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ?class-string
|
||||
*/
|
||||
private function getClassName(string $name): ?string
|
||||
{
|
||||
return $this->classFinder->find('EntryPoints', ucfirst($name));
|
||||
|
||||
@@ -35,5 +35,8 @@ namespace Espo\Core\EntryPoint\Traits;
|
||||
*/
|
||||
trait NoAuth
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $noAuth = true;
|
||||
}
|
||||
|
||||
@@ -34,5 +34,8 @@ namespace Espo\Core\EntryPoint\Traits;
|
||||
*/
|
||||
trait NotStrictAuth
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $notStrictAuth = true;
|
||||
}
|
||||
|
||||
@@ -34,73 +34,79 @@ use Espo\Core\Container;
|
||||
/** @deprecated */
|
||||
abstract class Base
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $authRequired = true;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $notStrictAuth = false;
|
||||
|
||||
private $container;
|
||||
private $container; /** @phpstan-ignore-line */
|
||||
|
||||
public function __construct(Container $container)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
protected function getContainer()
|
||||
protected function getContainer() /** @phpstan-ignore-line */
|
||||
{
|
||||
return $this->container;
|
||||
}
|
||||
|
||||
protected function getUser()
|
||||
protected function getUser() /** @phpstan-ignore-line */
|
||||
{
|
||||
return $this->getContainer()->get('user');
|
||||
}
|
||||
|
||||
protected function getAcl()
|
||||
protected function getAcl() /** @phpstan-ignore-line */
|
||||
{
|
||||
return $this->getContainer()->get('acl');
|
||||
}
|
||||
|
||||
protected function getEntityManager()
|
||||
protected function getEntityManager() /** @phpstan-ignore-line */
|
||||
{
|
||||
return $this->getContainer()->get('entityManager');
|
||||
}
|
||||
|
||||
protected function getServiceFactory()
|
||||
protected function getServiceFactory() /** @phpstan-ignore-line */
|
||||
{
|
||||
return $this->getContainer()->get('serviceFactory');
|
||||
}
|
||||
|
||||
protected function getConfig()
|
||||
protected function getConfig() /** @phpstan-ignore-line */
|
||||
{
|
||||
return $this->getContainer()->get('config');
|
||||
}
|
||||
|
||||
protected function getMetadata()
|
||||
protected function getMetadata() /** @phpstan-ignore-line */
|
||||
{
|
||||
return $this->getContainer()->get('metadata');
|
||||
}
|
||||
|
||||
protected function getDateTime()
|
||||
protected function getDateTime() /** @phpstan-ignore-line */
|
||||
{
|
||||
return $this->getContainer()->get('dateTime');
|
||||
}
|
||||
|
||||
protected function getNumber()
|
||||
protected function getNumber() /** @phpstan-ignore-line */
|
||||
{
|
||||
return $this->getContainer()->get('number');
|
||||
}
|
||||
|
||||
protected function getFileManager()
|
||||
protected function getFileManager() /** @phpstan-ignore-line */
|
||||
{
|
||||
return $this->getContainer()->get('fileManager');
|
||||
}
|
||||
|
||||
protected function getLanguage()
|
||||
protected function getLanguage() /** @phpstan-ignore-line */
|
||||
{
|
||||
return $this->getContainer()->get('language');
|
||||
}
|
||||
|
||||
protected function getClientManager()
|
||||
protected function getClientManager() /** @phpstan-ignore-line */
|
||||
{
|
||||
return $this->getContainer()->get('clientManager');
|
||||
}
|
||||
|
||||
@@ -1543,9 +1543,11 @@ class Service implements Crud,
|
||||
return null;
|
||||
}
|
||||
|
||||
/** @var ?Collection<TEntity> */
|
||||
return $finder->findByWhere($entity, WhereClause::fromRaw($whereClause));
|
||||
}
|
||||
|
||||
/** @var ?Collection<TEntity> */
|
||||
return $finder->find($entity);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user