Skip to content

EspoCRM – Open Source CRM Application

ref

Yuri Kuznetsov7e4254ab42c3
diff --git a/application/Espo/Controllers/Integration.php b/application/Espo/Controllers/Integration.php
index 3cc130f227..fae5947901 100644
--- a/application/Espo/Controllers/Integration.php
+++ b/application/Espo/Controllers/Integration.php
@@ -29,31 +29,34 @@
namespace Espo\Controllers;
+use Espo\Core\Exceptions\NotFound;
use Espo\Services\Integration as Service;
-
use Espo\Core\Exceptions\Forbidden;
use Espo\Core\Api\Request;
-
use Espo\Entities\User;
use stdClass;
class Integration
{
- private $service;
- private $user;
-
- public function __construct(Service $service, User $user)
- {
- $this->service = $service;
- $this->user = $user;
+ /**
+ * @throws Forbidden
+ */
+ public function __construct(
+ private Service $service,
+ private User $user,
+ ) {
if (!$this->user->isAdmin()) {
throw new Forbidden();
}
}
+ /**
+ * @throws Forbidden
+ * @throws NotFound
+ */
public function getActionRead(Request $request): stdClass
{
/** @var string $id */
@@ -64,6 +67,10 @@ class Integration
return $entity->getValueMap();
}
+ /**
+ * @throws Forbidden
+ * @throws NotFound
+ */
public function putActionUpdate(Request $request): stdClass
{
/** @var string $id */