mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-01 20:50:15 +02:00
StaticFactory :: lint
This commit is contained in:
@@ -14,7 +14,7 @@ final class StaticFactory
|
||||
{
|
||||
public static function factory(string $type): Formatter
|
||||
{
|
||||
return match($type) {
|
||||
return match ($type) {
|
||||
'number' => new FormatNumber(),
|
||||
'string' => new FormatString(),
|
||||
default => throw new InvalidArgumentException('Unknown format given'),
|
||||
|
Reference in New Issue
Block a user