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.
1 parent 12753df commit 2be5da2Copy full SHA for 2be5da2
src/Translator.php
@@ -16,11 +16,13 @@ class Translator
16
/**
17
* Loads translation from a Translations instance, a file on an array
18
*
19
- * @param Translations|string $translations
+ * @param Translations|string|array $translations
20
+ *
21
+ * @return Translator
22
*/
23
public function loadTranslations($translations)
24
{
- if ($translations instanceof Translations) {
25
+ if (is_object($translations) && $translations instanceof Translations) {
26
$this->loadArray(PhpArray::toArray($translations));
27
} elseif (is_string($translations) && is_file($translations)) {
28
$this->loadArray(include $translations);
0 commit comments