Browse Source

Merge pull request #3082 from ADmad/3.0-docblocks

Docblock fixes
José Lorenzo Rodríguez 12 years ago
parent
commit
af137072e8

+ 10 - 12
src/Console/Command/Task/ModelTask.php

@@ -25,8 +25,6 @@ use Cake\Utility\Inflector;
 
 /**
  * Task class for generating model files.
- *
- * @codingStandardsIgnoreFile
  */
 class ModelTask extends BakeTask {
 
@@ -156,7 +154,7 @@ class ModelTask extends BakeTask {
  *
  * @param string $className Name of class you want model to be.
  * @param string $table Table name
- * @return Cake\ORM\Table Table instance
+ * @return \Cake\ORM\Table Table instance
  */
 	public function getTableObject($className, $table) {
 		if (TableRegistry::exists($className)) {
@@ -172,6 +170,7 @@ class ModelTask extends BakeTask {
 /**
  * Get the array of associations to generate.
  *
+ * @param \Cake\ORM\Table $table
  * @return array
  */
 	public function getAssociations(Table $table) {
@@ -206,7 +205,7 @@ class ModelTask extends BakeTask {
 /**
  * Find belongsTo relations and add them to the associations list.
  *
- * @param ORM\Table $model Database\Table instance of table being generated.
+ * @param \Cake\ORM\Table $model Database\Table instance of table being generated.
  * @param array $associations Array of in progress associations
  * @return array Associations with belongsTo added in.
  */
@@ -234,7 +233,7 @@ class ModelTask extends BakeTask {
 /**
  * Find the hasMany relations and add them to associations list
  *
- * @param Model $model Model instance being generated
+ * @param \Cake\ORM\Table $model Model instance being generated
  * @param array $associations Array of in progress associations
  * @return array Associations with hasMany added in.
  */
@@ -279,7 +278,7 @@ class ModelTask extends BakeTask {
 /**
  * Find the BelongsToMany relations and add them to associations list
  *
- * @param Model $model Model instance being generated
+ * @param \Cake\ORM\Table $model Model instance being generated
  * @param array $associations Array of in-progress associations
  * @return array Associations with belongsToMany added in.
  */
@@ -316,7 +315,7 @@ class ModelTask extends BakeTask {
 /**
  * Get the display field from the model or parameters
  *
- * @param Cake\ORM\Table $model The model to introspect.
+ * @param \Cake\ORM\Table $model The model to introspect.
  * @return string
  */
 	public function getDisplayField($model) {
@@ -492,7 +491,7 @@ class ModelTask extends BakeTask {
 /**
  * Bake an entity class.
  *
- * @param Cake\ORM\Table $model Model name or object
+ * @param \Cake\ORM\Table $model Model name or object
  * @param array $data An array to use to generate the Table
  * @return string
  */
@@ -530,7 +529,7 @@ class ModelTask extends BakeTask {
 /**
  * Bake a table class.
  *
- * @param Cake\ORM\Table $model Model name or object
+ * @param \Cake\ORM\Table $model Model name or object
  * @param array $data An array to use to generate the Table
  * @return string
  */
@@ -574,7 +573,6 @@ class ModelTask extends BakeTask {
 /**
  * Outputs the a list of possible models or controllers from database
  *
- * @param string $useDbConfig Database configuration name
  * @return array
  */
 	public function listAll() {
@@ -623,7 +621,8 @@ class ModelTask extends BakeTask {
  *
  * Uses the `table` option if it is set.
  *
- * @return string.
+ * @param string $name Table name
+ * @return string
  */
 	public function getTable($name) {
 		if (isset($this->params['table'])) {
@@ -732,5 +731,4 @@ class ModelTask extends BakeTask {
 		return $this->Test->bake('Model', $className);
 	}
 
-
 }

+ 5 - 0
src/Console/Command/TestShell.php

@@ -52,6 +52,11 @@ class TestShell extends Shell {
 		return 255;
 	}
 
+/**
+ * Warning that test shell is defunct
+ *
+ * @return void
+ */
 	public function outputWarning() {
 		$this->err('<error>Test Shell has been removed.</error>');
 		$this->err('');

+ 2 - 1
src/Model/Behavior/Translate/TranslateTrait.php

@@ -28,7 +28,8 @@ trait TranslateTrait {
  * present, a new empty entity will be created so that values can be added to
  * it.
  *
- * @return void
+ * @param string $language Language to return entity for.
+ * @return \Cake\ORM\Entity
  */
 	public function translation($language) {
 		if ($language === $this->get('_locale')) {

+ 3 - 3
src/View/Form/EntityContext.php

@@ -343,7 +343,7 @@ class EntityContext implements ContextInterface {
  * conventions.
  *
  * @param array $parts Each one of the parts in a path for a field name
- * @return Validator
+ * @return \Cake\Validation\Validator
  */
 	protected function _getValidator($parts) {
 		$table = $this->_getTable($parts);
@@ -362,8 +362,8 @@ class EntityContext implements ContextInterface {
  * Get the table instance from a property path
  *
  * @param array $parts Each one of the parts in a path for a field name
- * @return array containing the table instance in the first position and the
- * property name in the second position
+ * @param boolean $rootFallback
+ * @return \Cake\ORM\Table|boolean Table instance or false
  */
 	protected function _getTable($parts, $rootFallback = true) {
 		if (count($parts) === 1) {