mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-04 14:07:25 +02:00
remove unneeded elses
This commit is contained in:
@@ -16,7 +16,8 @@ final class StaticFactory
|
||||
{
|
||||
if ($type == 'number') {
|
||||
return new FormatNumber();
|
||||
} elseif ($type == 'string') {
|
||||
}
|
||||
if ($type == 'string') {
|
||||
return new FormatString();
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user