Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

PHPDoc-Complete Comments for Controller Template #1539

Merged
merged 2 commits into from

2 participants

@DaSourcerer

The title pretty much says it: This PR completes the PHPdoc in the controller template, which in turn will reduce the number of warnings in editors that parse them.

.../gii/generators/crud/templates/default/controller.php
@@ -153,7 +153,9 @@ public function actionAdmin()
/**
* Returns the data model based on the primary key given in the GET variable.
* If the data model is not found, an HTTP exception will be raised.
- * @param integer the ID of the model to be loaded
+ * @param integer $id the ID of the model to be loaded
+ * @return CModel the loaded model
@samdark Owner
samdark added a note

I think it should be particular model class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../gii/generators/crud/templates/default/controller.php
@@ -165,7 +167,7 @@ public function loadModel($id)
/**
* Performs the AJAX validation.
- * @param CModel the model to be validated
+ * @param CModel $model the model to be validated
@samdark Owner
samdark added a note

Same here.

Done with 79fdf1d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@samdark samdark was assigned
@samdark samdark merged commit 51333b6 into yiisoft:master
@samdark
Owner

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 2 deletions.
  1. +4 −2 framework/gii/generators/crud/templates/default/controller.php
View
6 framework/gii/generators/crud/templates/default/controller.php
@@ -153,7 +153,9 @@ public function actionAdmin()
/**
* Returns the data model based on the primary key given in the GET variable.
* If the data model is not found, an HTTP exception will be raised.
- * @param integer the ID of the model to be loaded
+ * @param integer $id the ID of the model to be loaded
+ * @return <?php echo $this->modelClass; ?> the loaded model
+ * @throws CHttpException
*/
public function loadModel($id)
{
@@ -165,7 +167,7 @@ public function loadModel($id)
/**
* Performs the AJAX validation.
- * @param CModel the model to be validated
+ * @param <?php echo $this->modelClass; ?> $model the model to be validated
*/
protected function performAjaxValidation($model)
{
Something went wrong with that request. Please try again.