Skip to content

Commit

Permalink
Fix database tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon committed Jul 11, 2022
1 parent 098f275 commit be446fe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Console/Commands/SynchroniseTranslationsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class SynchroniseTranslationsCommand extends Command

public function __construct(private Scanner $scanner, private Translation $translation)
{
parent::__construct();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public function getGroupsFor(string $language): Collection
/**
* Get a language from the database.
*/
private function getLanguage(string $language): Model
private function getLanguage(string $language): ?Model
{
return Language::where('language', $language)->first();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Translation.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function getSourceLanguageTranslationsWith(string $language): Collection
/**
* Filter all keys and translations for a given language and string.
*/
public function filterTranslationsFor(string $language, string $filter): Collection
public function filterTranslationsFor(string $language, ?string $filter): Collection
{
$allTranslations = $this->getSourceLanguageTranslationsWith(($language));
if (!$filter) {
Expand Down

0 comments on commit be446fe

Please sign in to comment.