From a448f0cadb22d88b1f5255b2818d9afae56d7a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Voorem=C3=A4e?= Date: Thu, 18 Jul 2024 21:06:05 +0300 Subject: [PATCH] use LoggerAwareTrait from Psr/Log --- lib/Api/Api.php | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/lib/Api/Api.php b/lib/Api/Api.php index 2d19b75..079250a 100644 --- a/lib/Api/Api.php +++ b/lib/Api/Api.php @@ -14,6 +14,7 @@ use Mautic\Auth\AuthInterface; use Mautic\QueryBuilder\QueryBuilder; use Psr\Log\LoggerAwareInterface; +use Psr\Log\LoggerAwareTrait; use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; @@ -22,6 +23,8 @@ */ class Api implements LoggerAwareInterface { + use LoggerAwareTrait; + /** * Used by unit testing to force use of BC endpoints. * @@ -90,11 +93,6 @@ class Api implements LoggerAwareInterface */ private $auth; - /** - * @var LoggerInterface - */ - private $logger; - /** * @param string $baseUrl */ @@ -119,14 +117,6 @@ public function getLogger() return $this->logger; } - /** - * Sets a logger. - */ - public function setLogger(LoggerInterface $logger): void - { - $this->logger = $logger; - } - /** * Get the array of available search commands. *