Commit ed97632f by Alexander Makarov

Fixed scope method signatures

parent 0699eaad
......@@ -7,9 +7,10 @@ use yii\db\ActiveQuery;
*/
class CustomerQuery extends ActiveQuery
{
public static function active($query)
public function active()
{
$query->andWhere('status=1');
$this->andWhere('status=1');
return $this;
}
}
\ No newline at end of file
......@@ -7,9 +7,10 @@ use yii\mongodb\ActiveQuery;
*/
class CustomerQuery extends ActiveQuery
{
public static function activeOnly($query)
public function activeOnly()
{
$query->andWhere(['status' => 2]);
$this->andWhere(['status' => 2]);
return $this;
}
}
\ No newline at end of file
......@@ -7,9 +7,10 @@ use yii\sphinx\ActiveQuery;
*/
class ArticleIndexQuery extends ActiveQuery
{
public static function favoriteAuthor($query)
public function favoriteAuthor()
{
$query->andWhere('author_id=1');
$this->andWhere('author_id=1');
return $this;
}
}
\ No newline at end of file
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