remove unneeded elses

This commit is contained in:
mehdi hasanpour
2022-07-09 15:00:13 +04:30
parent d93f4e8ca7
commit 269c2c63fb
2 changed files with 3 additions and 3 deletions

View File

@@ -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