Added extra callable typehints

This commit is contained in:
Alexander Makarov
2014-07-10 19:12:05 +04:00
parent 4ff28fb9fb
commit 593b478f2b
2 changed files with 2 additions and 2 deletions

View File

@ -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],

View File

@ -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];