From 593b478f2bc7371c23e831cf42c5af1a341e1f0b Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 10 Jul 2014 19:12:05 +0400 Subject: [PATCH] Added extra callable typehints --- framework/db/ActiveQuery.php | 2 +- framework/db/ActiveRelationTrait.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/db/ActiveQuery.php b/framework/db/ActiveQuery.php index 008f5f11e8..b928f31880 100644 --- a/framework/db/ActiveQuery.php +++ b/framework/db/ActiveQuery.php @@ -699,7 +699,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface * @return static * @see via() */ - public function viaTable($tableName, $link, $callable = null) + public function viaTable($tableName, $link, callable $callable = null) { $relation = new ActiveQuery(get_class($this->primaryModel), [ 'from' => [$tableName], diff --git a/framework/db/ActiveRelationTrait.php b/framework/db/ActiveRelationTrait.php index 8e4d87c8b9..a7c0eb33c2 100644 --- a/framework/db/ActiveRelationTrait.php +++ b/framework/db/ActiveRelationTrait.php @@ -99,7 +99,7 @@ trait ActiveRelationTrait * Its signature should be `function($query)`, where `$query` is the query to be customized. * @return static the relation object itself. */ - public function via($relationName, $callable = null) + public function via($relationName, callable $callable = null) { $relation = $this->primaryModel->getRelation($relationName); $this->via = [$relationName, $relation];