mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-15 05:45:33 +08:00
many phpcs fixes
This commit is contained in:
@@ -135,7 +135,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface
|
||||
}
|
||||
$models = $this->fillUpSnippets($models);
|
||||
if (!$this->asArray) {
|
||||
foreach($models as $model) {
|
||||
foreach ($models as $model) {
|
||||
$model->afterFind();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,4 +78,4 @@ class ColumnSchema extends Object
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
namespace yii\sphinx;
|
||||
|
||||
use yii\base\NotSupportedException;
|
||||
|
||||
/**
|
||||
|
||||
@@ -59,4 +59,4 @@ class IndexSchema extends Object
|
||||
{
|
||||
return array_keys($this->columns);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -422,7 +422,7 @@ class QueryBuilder extends Object
|
||||
if (strpos($column, '(') === false) {
|
||||
$column = $this->db->quoteColumnName($column);
|
||||
}
|
||||
$columns[$i] = "$column AS " . $this->db->quoteColumnName($i);;
|
||||
$columns[$i] = "$column AS " . $this->db->quoteColumnName($i);
|
||||
} elseif (strpos($column, '(') === false) {
|
||||
if (preg_match('/^(.*?)(?i:\s+as\s+|\s+)([\w\-_\.]+)$/', $column, $matches)) {
|
||||
$columns[$i] = $this->db->quoteColumnName($matches[1]) . ' AS ' . $this->db->quoteColumnName($matches[2]);
|
||||
@@ -907,7 +907,8 @@ class QueryBuilder extends Object
|
||||
* @param array $params the binding parameters to be populated
|
||||
* @return string SQL expression, which represents column value
|
||||
*/
|
||||
protected function composeColumnValue($indexes, $columnName, $value, &$params) {
|
||||
protected function composeColumnValue($indexes, $columnName, $value, &$params)
|
||||
{
|
||||
if ($value === null) {
|
||||
return 'NULL';
|
||||
} elseif ($value instanceof Expression) {
|
||||
|
||||
@@ -486,4 +486,4 @@ class Schema extends Object
|
||||
|
||||
return $column;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user