Skip to content

Commit 2be5da2

Browse files
committed
minor changes
1 parent 12753df commit 2be5da2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Translator.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ class Translator
1616
/**
1717
* Loads translation from a Translations instance, a file on an array
1818
*
19-
* @param Translations|string $translations
19+
* @param Translations|string|array $translations
20+
*
21+
* @return Translator
2022
*/
2123
public function loadTranslations($translations)
2224
{
23-
if ($translations instanceof Translations) {
25+
if (is_object($translations) && $translations instanceof Translations) {
2426
$this->loadArray(PhpArray::toArray($translations));
2527
} elseif (is_string($translations) && is_file($translations)) {
2628
$this->loadArray(include $translations);

0 commit comments

Comments
 (0)