diff --git a/Structural/Flyweight/TextFactory.php b/Structural/Flyweight/TextFactory.php index db1402f..82b39ea 100644 --- a/Structural/Flyweight/TextFactory.php +++ b/Structural/Flyweight/TextFactory.php @@ -30,9 +30,8 @@ class TextFactory implements Countable { if (strlen($name) == 1) { return new Character($name); - } else { - return new Word($name); } + return new Word($name); } public function count(): int