fixes
This commit is contained in:
@@ -45,6 +45,8 @@ use Espo\Core\{
|
||||
|
||||
class Application extends BaseApplication
|
||||
{
|
||||
private $portal;
|
||||
|
||||
public function __construct(?string $portalId)
|
||||
{
|
||||
date_default_timezone_set('UTC');
|
||||
|
||||
@@ -69,7 +69,7 @@ use Espo\Core\{
|
||||
|
||||
use Espo\Core\Di;
|
||||
|
||||
use StdClass;
|
||||
use stdClass;
|
||||
use RuntimeException;
|
||||
|
||||
/**
|
||||
@@ -434,7 +434,7 @@ class Service implements Crud,
|
||||
}
|
||||
}
|
||||
|
||||
public function filterCreateInput(StdClass $data): void
|
||||
public function filterCreateInput(stdClass $data): void
|
||||
{
|
||||
unset($data->deleted);
|
||||
unset($data->id);
|
||||
@@ -452,7 +452,7 @@ class Service implements Crud,
|
||||
$this->handleCreateInput($data);
|
||||
}
|
||||
|
||||
public function filterUpdateInput(StdClass $data): void
|
||||
public function filterUpdateInput(stdClass $data): void
|
||||
{
|
||||
unset($data->deleted);
|
||||
unset($data->id);
|
||||
@@ -483,7 +483,7 @@ class Service implements Crud,
|
||||
{
|
||||
}
|
||||
|
||||
protected function processConcurrencyControl(Entity $entity, StdClass $data, int $versionNumber): void
|
||||
protected function processConcurrencyControl(Entity $entity, stdClass $data, int $versionNumber): void
|
||||
{
|
||||
if ($entity->get('versionNumber') === null) {
|
||||
return;
|
||||
@@ -521,7 +521,7 @@ class Service implements Crud,
|
||||
throw ConflictSilent::createWithBody('modified', json_encode($responseData));
|
||||
}
|
||||
|
||||
protected function processDuplicateCheck(Entity $entity, StdClass $data): void
|
||||
protected function processDuplicateCheck(Entity $entity, stdClass $data): void
|
||||
{
|
||||
$duplicateList = $this->findDuplicates($entity, $data);
|
||||
|
||||
@@ -538,7 +538,7 @@ class Service implements Crud,
|
||||
throw ConflictSilent::createWithBody('duplicate', json_encode($list));
|
||||
}
|
||||
|
||||
public function populateDefaults(Entity $entity, StdClass $data): void
|
||||
public function populateDefaults(Entity $entity, stdClass $data): void
|
||||
{
|
||||
if (!$this->user->isPortal()) {
|
||||
$forbiddenFieldList = null;
|
||||
@@ -598,7 +598,7 @@ class Service implements Crud,
|
||||
*
|
||||
* @throws ForbiddenSilent If no create access.
|
||||
*/
|
||||
public function create(StdClass $data, CreateParams $params): Entity
|
||||
public function create(stdClass $data, CreateParams $params): Entity
|
||||
{
|
||||
if (!$this->acl->check($this->entityType, AclTable::ACTION_CREATE)) {
|
||||
throw new ForbiddenSilent();
|
||||
@@ -646,7 +646,7 @@ class Service implements Crud,
|
||||
* @throws NotFound If record not found.
|
||||
* @throws Forbidden If no access.
|
||||
*/
|
||||
public function update(string $id, StdClass $data, UpdateParams $params): Entity
|
||||
public function update(string $id, stdClass $data, UpdateParams $params): Entity
|
||||
{
|
||||
if (!$this->acl->check($this->entityType, AclTable::ACTION_EDIT)) {
|
||||
throw new ForbiddenSilent();
|
||||
@@ -1502,7 +1502,7 @@ class Service implements Crud,
|
||||
return $this->getStreamService()->findEntityFollowers($entity, $params);
|
||||
}
|
||||
|
||||
public function getDuplicateAttributes(string $id): StdClass
|
||||
public function getDuplicateAttributes(string $id): stdClass
|
||||
{
|
||||
if (!$id) {
|
||||
throw new BadRequest("No ID.");
|
||||
|
||||
@@ -941,7 +941,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
$dtToday = new DateTime();
|
||||
$dt = new DateTime();
|
||||
|
||||
$fiscalYearShift = $this->getConfig()->get('fiscalYearShift', 0);
|
||||
$fiscalYearShift = $this->config->get('fiscalYearShift', 0);
|
||||
|
||||
$dt->modify('first day of January this year')->modify('+' . $fiscalYearShift . ' months');
|
||||
|
||||
@@ -971,7 +971,7 @@ class ItemGeneralConverter implements ItemConverter
|
||||
$dtToday = new DateTime();
|
||||
$dt = new DateTime();
|
||||
|
||||
$fiscalYearShift = $this->getConfig()->get('fiscalYearShift', 0);
|
||||
$fiscalYearShift = $this->config->get('fiscalYearShift', 0);
|
||||
|
||||
$dt->modify('first day of January this year')->modify('+' . $fiscalYearShift . ' months');
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ use Espo\Core\Exceptions\Forbidden;
|
||||
use Espo\Core\Exceptions\Error;
|
||||
use Espo\Core\Exceptions\NotFound;
|
||||
|
||||
use StdClass;
|
||||
use stdClass;
|
||||
|
||||
class Attachment extends Record
|
||||
{
|
||||
@@ -88,7 +88,7 @@ class Attachment extends Record
|
||||
}
|
||||
}
|
||||
|
||||
public function filterUpdateInput(StdClass $data): void
|
||||
public function filterUpdateInput(stdClass $data): void
|
||||
{
|
||||
parent::filterUpdateInput($data);
|
||||
|
||||
@@ -99,7 +99,7 @@ class Attachment extends Record
|
||||
unset($data->relatedType);
|
||||
}
|
||||
|
||||
public function filterCreateInput(StdClass $data): void
|
||||
public function filterCreateInput(stdClass $data): void
|
||||
{
|
||||
parent::filterCreateInput($data);
|
||||
|
||||
@@ -460,7 +460,7 @@ class Attachment extends Record
|
||||
];
|
||||
}
|
||||
|
||||
public function getFileData(string $id): StdClass
|
||||
public function getFileData(string $id): stdClass
|
||||
{
|
||||
$attachment = $this->getEntity($id);
|
||||
|
||||
|
||||
@@ -29,13 +29,13 @@
|
||||
|
||||
namespace Espo\Services;
|
||||
|
||||
use StdClass;
|
||||
use stdClass;
|
||||
|
||||
class AuthToken extends Record
|
||||
{
|
||||
protected $actionHistoryDisabled = true;
|
||||
|
||||
public function filterUpdateInput(StdClass $data): void
|
||||
public function filterUpdateInput(stdClass $data): void
|
||||
{
|
||||
parent::filterUpdateInput($data);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ use Espo\Core\Exceptions\Forbidden;
|
||||
|
||||
use Espo\Core\Di;
|
||||
|
||||
use StdClass;
|
||||
use stdClass;
|
||||
|
||||
class Webhook extends Record implements
|
||||
Di\WebhookManagerAware
|
||||
@@ -56,7 +56,7 @@ class Webhook extends Record implements
|
||||
|
||||
protected $readOnlyAttributeList = ['secretKey'];
|
||||
|
||||
public function populateDefaults(Entity $entity, StdClass $data): void
|
||||
public function populateDefaults(Entity $entity, stdClass $data): void
|
||||
{
|
||||
parent::populateDefaults($entity, $data);
|
||||
|
||||
@@ -74,7 +74,7 @@ class Webhook extends Record implements
|
||||
unset($data->type);
|
||||
}
|
||||
|
||||
public function filterUpdateInput(StdClass $data): void
|
||||
public function filterUpdateInput(stdClass $data): void
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
unset($data->event);
|
||||
|
||||
Reference in New Issue
Block a user