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. *