We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6807e65 + ecde729 commit cbc3ac5Copy full SHA for cbc3ac5
src/Utility/Language.php
@@ -39,13 +39,17 @@ public function setLanguageOrTranslations($target): self
39
{
40
if (\is_string($target)) {
41
$this->setUpWithLanguage($target);
42
- } elseif (\is_array($target)) {
+
43
+ return $this;
44
+ }
45
46
+ if (\is_array($target)) {
47
$this->setUpWithTranslations($target);
- } else {
- throw new \InvalidArgumentException('$target must be the type of string|string[]');
48
49
50
}
51
- return $this;
52
+ throw new \InvalidArgumentException('$target must be the type of string|string[]');
53
54
55
/**
0 commit comments