Skip to content
This repository was archived by the owner on Jun 18, 2019. It is now read-only.

Commit 65e4904

Browse files
committed
Type hint closure parameters.
1 parent d18b2d0 commit 65e4904

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Translatable/Translatable.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use App;
44
use Dimsav\Translatable\Exception\LocalesNotDefinedException;
55
use Illuminate\Database\Eloquent\Builder;
6+
use Illuminate\Database\Query\Builder as QueryBuilder;
67
use Illuminate\Database\Eloquent\MassAssignmentException;
78
use Illuminate\Database\Eloquent\Model;
89

@@ -324,9 +325,9 @@ public function scopeListsTranslations(Builder $query, $translationField)
324325
;
325326
if ($withFallback)
326327
{
327-
$query->orWhere(function($q){
328+
$query->orWhere(function(Builder $q){
328329
$q->where($this->getTranslationsTable() .'.'. $this->getLocaleKey(), $this->getFallbackLocale())
329-
->whereNotIn($this->getTranslationsTable() . '.' . $this->getRelationKey(), function($q)
330+
->whereNotIn($this->getTranslationsTable() . '.' . $this->getRelationKey(), function(QueryBuilder $q)
330331
{
331332
$q->select($this->getTranslationsTable() . '.' . $this->getRelationKey())
332333
->from($this->getTranslationsTable())

0 commit comments

Comments
 (0)