Skip to content

Commit

Permalink
Merge pull request #380 from dmromanov/feature/fix-annotations
Browse files Browse the repository at this point in the history
Corrected fieldValidation annotation
  • Loading branch information
markstory authored Nov 23, 2017
2 parents 3c3c512 + a62abd4 commit 076639a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Shell/Task/ModelTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -691,14 +691,14 @@ public function getValidation($model, $associations = [])
* @param \Cake\Database\Schema\TableSchema $schema The table schema for the current field.
* @param string $fieldName Name of field to be validated.
* @param array $metaData metadata for field
* @param string $primaryKey The primary key field
* @param array $primaryKey The primary key field
* @return array Array of validation for the field.
*/
public function fieldValidation($schema, $fieldName, array $metaData, $primaryKey)
public function fieldValidation($schema, $fieldName, array $metaData, array $primaryKey)
{
$ignoreFields = ['lft', 'rght', 'created', 'modified', 'updated'];
if (in_array($fieldName, $ignoreFields)) {
return false;
return [];
}

$rule = false;
Expand Down

0 comments on commit 076639a

Please sign in to comment.