Commit 1d7f4854 by Luciano Baraglia

CS style fix

parent c1fac6eb
...@@ -488,7 +488,9 @@ abstract class Generator extends Model ...@@ -488,7 +488,9 @@ abstract class Generator extends Model
* @param string $string the text be generated * @param string $string the text be generated
* @param array $placeholders the placeholders to use by `Yii::t()` * @param array $placeholders the placeholders to use by `Yii::t()`
*/ */
public function generateString($string = '', $placeholders = []) { public function generateString($string = '', $placeholders = [])
{
$string = addslashes($string);
if ($this->enableI18N) { if ($this->enableI18N) {
// If there are placeholders, use them // If there are placeholders, use them
if (!empty($placeholders)) { if (!empty($placeholders)) {
......
...@@ -49,7 +49,7 @@ class <?= $searchModelClass ?> extends Model ...@@ -49,7 +49,7 @@ class <?= $searchModelClass ?> extends Model
{ {
return [ return [
<?php foreach ($labels as $name => $label): ?> <?php foreach ($labels as $name => $label): ?>
<?= "'$name' => " . $generator->generateString(addslashes($label)) . ",\n" ?> <?= "'$name' => " . $generator->generateString($label) . ",\n" ?>
<?php endforeach; ?> <?php endforeach; ?>
]; ];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment