mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-30 11:40:13 +02:00
removed ...Interface suffix and added method to interface
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user