Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 8, 2018
1 parent df2cf1f commit 3992140
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function addEagerConstraints(array $models)
{
$whereIn = in_array($this->parent->getKeyType(), ['int', 'integer']) ? 'whereInRaw' : 'whereIn';

$this->query->$whereIn(
$this->query->{$whereIn}(
$this->foreignKey, $this->getKeys($models, $this->localKey)
);
}
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Database/Query/Grammars/Grammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ protected function whereNotInSub(Builder $query, $where)
/**
* Compile a "where in raw" clause.
*
* For safety, this method is only used with integer values as whereInRaw utilizes "intval".

This comment has been minimized.

Copy link
@vlakoff

vlakoff Nov 11, 2018

Contributor

Following up to d10b0a5:

--- utilizes "intval"
+++ casts the values to integers

This comment has been minimized.

Copy link
@vlakoff

vlakoff Nov 15, 2018

Contributor

PR submitted for this: #26516.

*
* @param \Illuminate\Database\Query\Builder $query
* @param array $where
* @return string
Expand Down

0 comments on commit 3992140

Please sign in to comment.