diff --git a/build/controllers/PhpDocController.php b/build/controllers/PhpDocController.php index a96495b..1011d19 100644 --- a/build/controllers/PhpDocController.php +++ b/build/controllers/PhpDocController.php @@ -253,8 +253,12 @@ class PhpDocController extends Controller foreach ($props as $propName => &$prop) { $docline = ' * @'; $docline .= 'property'; // Do not use property-read and property-write as few IDEs support complex syntax. + $note = ''; if (isset($prop['get']) && isset($prop['set'])) { - $note = ''; + if ($prop['get']['type'] != $prop['set']['type']) { + $note = ' Note that the type of this property differs in getter and setter.' + . ' See [[get'.ucfirst($propName).'()]] and [[set'.ucfirst($propName).'()]] for details.'; + } } elseif (isset($prop['get'])) { $note = ' This property is read-only.'; // $docline .= '-read'; diff --git a/framework/yii/caching/MemCache.php b/framework/yii/caching/MemCache.php index ee8f1e7..53202f0 100644 --- a/framework/yii/caching/MemCache.php +++ b/framework/yii/caching/MemCache.php @@ -53,8 +53,9 @@ use yii\base\InvalidConfigException; * each server, such as `persistent`, `weight`, `timeout`. Please see [[MemCacheServer]] for available options. * * @property \Memcache|\Memcached $memcache The memcache (or memcached) object used by this cache component. - * @property array $servers List of memcache server configurations. Each element must be an array - * with the following keys: host, port, persistent, weight, timeout, retryInterval, status. + * This property is read-only. + * @property MemCacheServer[] $servers List of memcache server configurations. Note that the type of this + * property differs in getter and setter. See [[getServers()]] and [[setServers()]] for details. * * @author Qiang Xue * @since 2.0 diff --git a/framework/yii/console/controllers/AssetController.php b/framework/yii/console/controllers/AssetController.php index 287beca..1e95dd8 100644 --- a/framework/yii/console/controllers/AssetController.php +++ b/framework/yii/console/controllers/AssetController.php @@ -28,7 +28,8 @@ use yii\console\Controller; * Note: by default this command relies on an external tools to perform actual files compression, * check [[jsCompressor]] and [[cssCompressor]] for more details. * - * @property \yii\web\AssetManager $assetManager Asset manager instance. + * @property \yii\web\AssetManager $assetManager Asset manager instance. Note that the type of this property + * differs in getter and setter. See [[getAssetManager()]] and [[setAssetManager()]] for details. * * @author Qiang Xue * @since 2.0 diff --git a/framework/yii/data/DataProvider.php b/framework/yii/data/DataProvider.php index 8e648cc..7d0244c 100644 --- a/framework/yii/data/DataProvider.php +++ b/framework/yii/data/DataProvider.php @@ -17,9 +17,11 @@ use yii\base\InvalidParamException; * It implements the [[getPagination()]] and [[getSort()]] methods as specified by the [[IDataProvider]] interface. * * @property integer $count The number of data models in the current page. This property is read-only. - * @property Pagination $pagination The pagination object. If this is false, it means the pagination is - * disabled. - * @property Sort $sort The sorting object. If this is false, it means the sorting is disabled. + * @property Pagination|boolean $pagination The pagination object. If this is false, it means the pagination + * is disabled. Note that the type of this property differs in getter and setter. See [[getPagination()]] and + * [[setPagination()]] for details. + * @property Sort|boolean $sort The sorting object. If this is false, it means that sorting is disabled. Note + * that the type of this property differs in getter and setter. See [[getSort()]] and [[setSort()]] for details. * * @author Qiang Xue * @since 2.0 @@ -37,7 +39,7 @@ abstract class DataProvider extends Component implements IDataProvider private $_pagination; /** - * @return Pagination the pagination object. If this is false, it means the pagination is disabled. + * @return Pagination|boolean the pagination object. If this is false, it means the pagination is disabled. */ public function getPagination() { @@ -80,7 +82,7 @@ abstract class DataProvider extends Component implements IDataProvider } /** - * @return Sort the sorting object. If this is false, it means the sorting is disabled. + * @return Sort|boolean the sorting object. If this is false, it means the sorting is disabled. */ public function getSort() { diff --git a/framework/yii/db/Command.php b/framework/yii/db/Command.php index d7db35c..f9376ee 100644 --- a/framework/yii/db/Command.php +++ b/framework/yii/db/Command.php @@ -44,7 +44,8 @@ use yii\caching\Cache; * * To build SELECT SQL statements, please use [[QueryBuilder]] instead. * - * @property string $rawSql The raw SQL. This property is read-only. + * @property string $rawSql The raw SQL with parameter values inserted into the corresponding placeholders in + * [[sql]]. This property is read-only. * @property string $sql The SQL statement to be executed. * * @author Qiang Xue @@ -103,7 +104,7 @@ class Command extends \yii\base\Component * Returns the raw SQL by inserting parameter values into the corresponding placeholders in [[sql]]. * Note that the return value of this method should mainly be used for logging purpose. * It is likely that this method returns an invalid SQL due to improper replacement of parameter placeholders. - * @return string the raw SQL + * @return string the raw SQL with parameter values inserted into the corresponding placeholders in [[sql]]. */ public function getRawSql() { diff --git a/framework/yii/log/Target.php b/framework/yii/log/Target.php index c858412..0cb72ef 100644 --- a/framework/yii/log/Target.php +++ b/framework/yii/log/Target.php @@ -23,7 +23,8 @@ use yii\base\InvalidConfigException; * may specify [[except]] to exclude messages of certain categories. * * @property integer $levels The message levels that this target is interested in. This is a bitmap of level - * values. Defaults to 0, meaning all available levels. + * values. Defaults to 0, meaning all available levels. Note that the type of this property differs in getter + * and setter. See [[getLevels()]] and [[setLevels()]] for details. * * @author Qiang Xue * @since 2.0 diff --git a/framework/yii/web/AssetManager.php b/framework/yii/web/AssetManager.php index fd7ed1d..43e7cf9 100644 --- a/framework/yii/web/AssetManager.php +++ b/framework/yii/web/AssetManager.php @@ -16,7 +16,8 @@ use yii\helpers\FileHelper; /** * AssetManager manages asset bundles and asset publishing. * - * @property IAssetConverter $converter The asset converter. + * @property IAssetConverter $converter The asset converter. Note that the type of this property differs in + * getter and setter. See [[getConverter()]] and [[setConverter()]] for details. * * @author Qiang Xue * @since 2.0 diff --git a/framework/yii/web/User.php b/framework/yii/web/User.php index cfdafd9..b1ca8c2 100644 --- a/framework/yii/web/User.php +++ b/framework/yii/web/User.php @@ -25,7 +25,8 @@ use yii\base\InvalidConfigException; * @property Identity $identity The identity object associated with the currently logged user. Null is * returned if the user is not logged in (not authenticated). * @property boolean $isGuest Whether the current user is a guest. This property is read-only. - * @property string $returnUrl The URL that the user should be redirected to after login. + * @property string $returnUrl The URL that the user should be redirected to after login. Note that the type + * of this property differs in getter and setter. See [[getReturnUrl()]] and [[setReturnUrl()]] for details. * * @author Qiang Xue * @since 2.0