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

@@ -16,7 +16,8 @@ final class StaticFactory
{
if ($type == 'number') {
return new FormatNumber();
} elseif ($type == 'string') {
}
if ($type == 'string') {
return new FormatString();
}

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