This commit is contained in:
Dominik Liebler
2021-04-12 14:04:45 +02:00
parent 5c5d453506
commit 4678b5d86f
50 changed files with 992 additions and 1430 deletions

View File

@@ -4,11 +4,8 @@ namespace DesignPatterns\Creational\FactoryMethod;
class FileLogger implements Logger
{
private string $filePath;
public function __construct(string $filePath)
public function __construct(private string $filePath)
{
$this->filePath = $filePath;
}
public function log(string $message)

View File

@@ -4,11 +4,8 @@ namespace DesignPatterns\Creational\FactoryMethod;
class FileLoggerFactory implements LoggerFactory
{
private string $filePath;
public function __construct(string $filePath)
public function __construct(private string $filePath)
{
$this->filePath = $filePath;
}
public function createLogger(): Logger