From 12217a3ed83f062efaf9475f5d7633cb4e01e362 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Tue, 10 Dec 2013 20:42:43 +0100 Subject: [PATCH] code style and docs --- extensions/yii/gii/generators/crud/Generator.php | 4 ++-- framework/yii/grid/DataColumn.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/yii/gii/generators/crud/Generator.php b/extensions/yii/gii/generators/crud/Generator.php index b126c7b..bbd2ab5 100644 --- a/extensions/yii/gii/generators/crud/Generator.php +++ b/extensions/yii/gii/generators/crud/Generator.php @@ -188,9 +188,9 @@ class Generator extends \yii\gii\Generator $tableSchema = $this->getTableSchema(); if ($tableSchema === false || !isset($tableSchema->columns[$attribute])) { if (preg_match('/^(password|pass|passwd|passcode)$/i', $attribute)) { - return "\$form->field(\$model, '$attribute')->passwordInput();"; + return "\$form->field(\$model, '$attribute')->passwordInput()"; } else { - return "\$form->field(\$model, '$attribute');"; + return "\$form->field(\$model, '$attribute')"; } } $column = $tableSchema->columns[$attribute]; diff --git a/framework/yii/grid/DataColumn.php b/framework/yii/grid/DataColumn.php index d51af8f..032c21c 100644 --- a/framework/yii/grid/DataColumn.php +++ b/framework/yii/grid/DataColumn.php @@ -41,6 +41,7 @@ class DataColumn extends Column public $label; /** * @var \Closure an anonymous function that returns the value to be displayed for every data model. + * The signature of this function is `function ($model, $index, $widget)`. * If this is not set, `$model[$attribute]` will be used to obtain the value. */ public $value;