Skip to content

Commit

Permalink
NGSTACK-411 Fix wrong logger association
Browse files Browse the repository at this point in the history
  • Loading branch information
RandyCupic authored and pspanja committed Sep 2, 2020
1 parent a6023ee commit 90bd5b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/Core/Site/QueryType/Location/Children.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;

/**
* Children Location QueryType.
Expand All @@ -21,7 +22,7 @@
final class Children extends Location
{
/**
* @var \Netgen\EzPlatformSiteApi\Core\Site\QueryType\Location\LoggerInterface
* @var \Psr\Log\LoggerInterface
*/
protected $logger;

Expand All @@ -32,7 +33,7 @@ final class Children extends Location
*/
public function __construct(?LoggerInterface $logger = null)
{
$this->logger = $logger;
$this->logger = $logger ?? new NullLogger();
}

public static function getName(): string
Expand Down
5 changes: 3 additions & 2 deletions lib/Core/Site/QueryType/Location/Siblings.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;

/**
* Siblings Location QueryType.
Expand All @@ -22,7 +23,7 @@
final class Siblings extends Location
{
/**
* @var \Netgen\EzPlatformSiteApi\Core\Site\QueryType\Location\LoggerInterface
* @var \Psr\Log\LoggerInterface
*/
protected $logger;

Expand All @@ -33,7 +34,7 @@ final class Siblings extends Location
*/
public function __construct(?LoggerInterface $logger = null)
{
$this->logger = $logger;
$this->logger = $logger ?? new NullLogger();
}

public static function getName(): string
Expand Down

0 comments on commit 90bd5b8

Please sign in to comment.