Commit 593b478f by Alexander Makarov

Added extra callable typehints

parent 4ff28fb9
...@@ -699,7 +699,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface ...@@ -699,7 +699,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface
* @return static * @return static
* @see via() * @see via()
*/ */
public function viaTable($tableName, $link, $callable = null) public function viaTable($tableName, $link, callable $callable = null)
{ {
$relation = new ActiveQuery(get_class($this->primaryModel), [ $relation = new ActiveQuery(get_class($this->primaryModel), [
'from' => [$tableName], 'from' => [$tableName],
......
...@@ -99,7 +99,7 @@ trait ActiveRelationTrait ...@@ -99,7 +99,7 @@ trait ActiveRelationTrait
* Its signature should be `function($query)`, where `$query` is the query to be customized. * Its signature should be `function($query)`, where `$query` is the query to be customized.
* @return static the relation object itself. * @return static the relation object itself.
*/ */
public function via($relationName, $callable = null) public function via($relationName, callable $callable = null)
{ {
$relation = $this->primaryModel->getRelation($relationName); $relation = $this->primaryModel->getRelation($relationName);
$this->via = [$relationName, $relation]; $this->via = [$relationName, $relation];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment