aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller/CollaborationResourcesController.php
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-04-12 17:55:01 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-05-20 22:18:06 +0200
commitb70c6a128fe5d0053b7971881696eafce4cb7c26 (patch)
tree641ff76531803c207a92d86f47d46b6dd93ab6d3 /core/Controller/CollaborationResourcesController.php
parent2b0d82675f669f00ad90f2750b1832a60ec9f766 (diff)
downloadnextcloud-server-b70c6a128fe5d0053b7971881696eafce4cb7c26.tar.gz
nextcloud-server-b70c6a128fe5d0053b7971881696eafce4cb7c26.zip
Update core to PHP 7.4 standard
- Typed properties - Port to LoggerInterface Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'core/Controller/CollaborationResourcesController.php')
-rw-r--r--core/Controller/CollaborationResourcesController.php20
1 files changed, 8 insertions, 12 deletions
diff --git a/core/Controller/CollaborationResourcesController.php b/core/Controller/CollaborationResourcesController.php
index 114423e1a2f..659ff32baee 100644
--- a/core/Controller/CollaborationResourcesController.php
+++ b/core/Controller/CollaborationResourcesController.php
@@ -36,25 +36,21 @@ use OCP\Collaboration\Resources\ICollection;
use OCP\Collaboration\Resources\IManager;
use OCP\Collaboration\Resources\IResource;
use OCP\Collaboration\Resources\ResourceException;
-use OCP\ILogger;
use OCP\IRequest;
use OCP\IUserSession;
+use Psr\Log\LoggerInterface;
class CollaborationResourcesController extends OCSController {
-
- /** @var IManager */
- private $manager;
- /** @var IUserSession */
- private $userSession;
- /** @var ILogger */
- private $logger;
+ private IManager $manager;
+ private IUserSession $userSession;
+ private LoggerInterface $logger;
public function __construct(
string $appName,
IRequest $request,
IManager $manager,
IUserSession $userSession,
- ILogger $logger
+ LoggerInterface $logger
) {
parent::__construct($appName, $request);
@@ -240,7 +236,7 @@ class CollaborationResourcesController extends OCSController {
} catch (CollectionException $e) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
} catch (Exception $e) {
- $this->logger->logException($e);
+ $this->logger->critical($e->getMessage(), ['exception' => $e, 'app' => 'core']);
return new DataResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
}
}
@@ -253,7 +249,7 @@ class CollaborationResourcesController extends OCSController {
$result[] = $this->prepareCollection($collection);
} catch (CollectionException $e) {
} catch (Exception $e) {
- $this->logger->logException($e);
+ $this->logger->critical($e->getMessage(), ['exception' => $e, 'app' => 'core']);
}
}
@@ -280,7 +276,7 @@ class CollaborationResourcesController extends OCSController {
$result[] = $this->prepareResource($resource);
} catch (ResourceException $e) {
} catch (Exception $e) {
- $this->logger->logException($e);
+ $this->logger->critical($e->getMessage(), ['exception' => $e, 'app' => 'core']);
}
}