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