mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-26 01:31:20 +02:00
remove Interface-Suffix
This commit is contained in:
@@ -6,7 +6,7 @@ namespace DesignPatterns\Behavioral\NullObject;
|
||||
/**
|
||||
* Key feature: NullLogger must inherit from this interface like any other loggers
|
||||
*/
|
||||
interface LoggerInterface
|
||||
interface Logger
|
||||
{
|
||||
public function log(string $str);
|
||||
}
|
@@ -3,7 +3,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace DesignPatterns\Behavioral\NullObject;
|
||||
|
||||
class NullLogger implements LoggerInterface
|
||||
class NullLogger implements Logger
|
||||
{
|
||||
public function log(string $str)
|
||||
{
|
||||
|
@@ -3,7 +3,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace DesignPatterns\Behavioral\NullObject;
|
||||
|
||||
class PrintLogger implements LoggerInterface
|
||||
class PrintLogger implements Logger
|
||||
{
|
||||
public function log(string $str)
|
||||
{
|
||||
|
@@ -43,9 +43,9 @@ Service.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
LoggerInterface.php
|
||||
Logger.php
|
||||
|
||||
.. literalinclude:: LoggerInterface.php
|
||||
.. literalinclude:: Logger.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
|
@@ -6,14 +6,14 @@ namespace DesignPatterns\Behavioral\NullObject;
|
||||
class Service
|
||||
{
|
||||
/**
|
||||
* @var LoggerInterface
|
||||
* @var Logger
|
||||
*/
|
||||
private $logger;
|
||||
|
||||
/**
|
||||
* @param LoggerInterface $logger
|
||||
* @param Logger $logger
|
||||
*/
|
||||
public function __construct(LoggerInterface $logger)
|
||||
public function __construct(Logger $logger)
|
||||
{
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 28 KiB |
Reference in New Issue
Block a user