Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed May 5, 2021
1 parent 08a133e commit 26656a2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Yii Framework 2 Change Log
------------------------

- Bug #18323: Fix client validation of RadioList when there are disabled items (toir427)
- Enh #18534: Added `prepareSearchQuery` property in `yii\rest\IndexAction` (programmis)
- Enh #18534: Add `prepareSearchQuery` property in `yii\rest\IndexAction` (programmis)
- Enh #18566: Throw the original exception when `yii\web\Controller::bindInjectedParams()` catches HttpException (pigochu)
- Bug #18585: Fix `yii\validators\EmailValidator` to handle an edge case where `IDN` is enabled, but fails ascii conversion for valid email addresses (ihitbuttons)
- Bug #18574: Fix `yii\web\DbSession` to use the correct db if strict mode is used (Mignar)
Expand Down
15 changes: 6 additions & 9 deletions framework/caching/DbCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,8 @@ protected function flushValues()
}

/**
* @return bool
*
* Checking Mssql: if field is varbinary - return true
* @return bool whether field is MSSQL varbinary
* @since 2.0.42
*/
protected function isVarbinaryDataField()
{
Expand All @@ -311,19 +310,17 @@ protected function isVarbinaryDataField()
}

/**
* @return string
* Returning `data` field name with converting for usage in MSSQL (if needs)
* @return string `data` field name converted for usage in MSSQL (if needed)
* @since 2.0.42
*/
protected function getDataFieldName()
{
return $this->isVarbinaryDataField() ? 'convert(nvarchar(max),[data]) data' : 'data';
}

/**
* @param $value
* @return PdoValue
*
* Return PdoValue or direct $value for usage in MSSQL
* @return PdoValue PdoValue or direct $value for usage in MSSQL
* @since 2.0.42
*/
protected function getDataFieldValue($value)
{
Expand Down
3 changes: 0 additions & 3 deletions framework/db/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ class Connection extends Component
* Is used to restore a QueryBuilder configuration after the connection close/open cycle.
*
* @see restoreQueryBuilderConfiguration()
* @since 2.0.42
*/
private $_queryBuilderConfigurations = [];

Expand Down Expand Up @@ -892,8 +891,6 @@ public function setQueryBuilder($value)

/**
* Restores custom QueryBuilder configuration after the connection close/open cycle
*
* @since 2.0.42
*/
private function restoreQueryBuilderConfiguration()
{
Expand Down
8 changes: 4 additions & 4 deletions framework/db/mssql/ColumnSchemaBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __toString()
}

/**
* Changes default format string to MSSQL ALTER COMMAND
* Changes default format string to MSSQL ALTER COMMAND.
*/
public function setAlterColumnFormat()
{
Expand All @@ -45,7 +45,7 @@ public function setAlterColumnFormat()

/**
* Getting the `Default` value for constraint
* @return string|Expression|null
* @return string|Expression|null default value of the column.
*/
public function getDefaultValue()
{
Expand All @@ -58,15 +58,15 @@ public function getDefaultValue()

/**
* Get the `Check` value for constraint
* @return string|null
* @return string|null the `CHECK` constraint for the column.
*/
public function getCheckValue()
{
return $this->check !== null ? (string) $this->check : null;
}

/**
* @return bool
* @return bool whether the column values should be unique. If this is `true`, a `UNIQUE` constraint will be added.
*/
public function isUnique()
{
Expand Down

0 comments on commit 26656a2

Please sign in to comment.