Browse Source

Added extra callable typehints

tags/2.0.0-rc
Alexander Makarov 10 years ago
parent
commit
593b478f2b
  1. 2
      framework/db/ActiveQuery.php
  2. 2
      framework/db/ActiveRelationTrait.php

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

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

Loading…
Cancel
Save