Skip to content

Commit

Permalink
Merge pull request #327 from matbcvo/psr-logger
Browse files Browse the repository at this point in the history
Use LoggerAwareTrait from Psr/Log
  • Loading branch information
escopecz authored Jul 19, 2024
2 parents c1ae7f7 + a448f0c commit 622e15f
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions lib/Api/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -22,6 +23,8 @@
*/
class Api implements LoggerAwareInterface
{
use LoggerAwareTrait;

/**
* Used by unit testing to force use of BC endpoints.
*
Expand Down Expand Up @@ -90,11 +93,6 @@ class Api implements LoggerAwareInterface
*/
private $auth;

/**
* @var LoggerInterface
*/
private $logger;

/**
* @param string $baseUrl
*/
Expand All @@ -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.
*
Expand Down

0 comments on commit 622e15f

Please sign in to comment.