Skip to content

Commit

Permalink
Refactoring code
Browse files Browse the repository at this point in the history
  • Loading branch information
voskobovich committed Mar 24, 2018
1 parent d8ef3a5 commit 7fa85cc
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/actions/IndexAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ protected function prepareProvider($model)
return \call_user_func($this->prepareProvider, $form, $model, $this);
}

/** @var \yii\db\ActiveRecord $model */
$model = new $this->modelClass;

return new ActiveDataProvider([
'query' => $form->buildQuery($model),
]);
Expand Down
2 changes: 1 addition & 1 deletion src/actions/RelationAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function run($id)
/**
* Prepares the data provider that should return the requested collection of the models.
*
* @param \yii\db\ActiveRecord $model
* @param \yii\db\ActiveRecordInterface $model
*
* @throws \yii\base\InvalidArgumentException
* @throws \yii\base\InvalidParamException
Expand Down
2 changes: 1 addition & 1 deletion src/forms/IndexFormAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ abstract class IndexFormAbstract extends Model
/**
* Query building.
*
* @param \yii\db\ActiveRecord $model
* @param \yii\db\ActiveRecordInterface $model
*
* @return \yii\db\ActiveQuery
*/
Expand Down
2 changes: 1 addition & 1 deletion src/forms/RelationFormAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ abstract class RelationFormAbstract extends Model
/**
* Query building.
*
* @param \yii\db\ActiveRecord $model
* @param \yii\db\ActiveRecordInterface $model
*
* @return \yii\db\ActiveQuery
*/
Expand Down

0 comments on commit 7fa85cc

Please sign in to comment.