removed ...Interface suffix and added method to interface

This commit is contained in:
Dominik Liebler
2018-11-06 20:18:30 +01:00
parent 9910fdf111
commit b0ac02f01e
9 changed files with 136 additions and 260 deletions

View File

@@ -11,15 +11,13 @@ final class StaticFactory
/**
* @param string $type
*
* @return FormatterInterface
* @return Formatter
*/
public static function factory(string $type): FormatterInterface
public static function factory(string $type): Formatter
{
if ($type == 'number') {
return new FormatNumber();
}
if ($type == 'string') {
} elseif ($type == 'string') {
return new FormatString();
}