Abstract factory (#366)

* rewrite of the Abstract Factory pattern

* update composer deps

* fixed argument to json_encode which cannot be null
This commit is contained in:
Dominik Liebler
2019-09-03 18:40:18 +02:00
committed by GitHub
parent 5fb2980b45
commit e3fd6631b5
16 changed files with 165 additions and 111 deletions

View File

@@ -0,0 +1,11 @@
<?php
namespace DesignPatterns\Creational\AbstractFactory;
class WinCsvWriter implements CsvWriter
{
public function write(array $line): string
{
return join(',', $line) . "\r\n";
}
}