diff --git a/docs/guide-es/caching-data.md b/docs/guide-es/caching-data.md index fadc323ead..6280c4b43e 100644 --- a/docs/guide-es/caching-data.md +++ b/docs/guide-es/caching-data.md @@ -9,7 +9,7 @@ El siguiente código muestra el típico patrón de uso para el almacenamiento en // intenta recuperar $data de la caché $data = $cache->get($key); -if ($data === `false`) { +if ($data === false) { // $data no ha sido encontrada en la caché, calcularla desde cero @@ -160,7 +160,7 @@ $cache->set($key, $data, 45); sleep(50); $data = $cache->get($key); -if ($data === `false`) { +if ($data === false) { // $data ha caducado o no ha sido encontrado en la memoria caché } ``` diff --git a/docs/guide-es/concept-configurations.md b/docs/guide-es/concept-configurations.md index 5a262b8005..3027a8266c 100644 --- a/docs/guide-es/concept-configurations.md +++ b/docs/guide-es/concept-configurations.md @@ -121,7 +121,7 @@ Cuando se utiliza [widgets](structure-widgets.md), a menudo es necesario utiliza use yii\widgets\Menu; echo Menu::widget([ - 'activateItems' => `false`, + 'activateItems' => false, 'items' => [ ['label' => 'Home', 'url' => ['site/index']], ['label' => 'Products', 'url' => ['product/index']], diff --git a/docs/guide-es/tutorial-core-validators.md b/docs/guide-es/tutorial-core-validators.md index fe80e56a55..4a5fced2ac 100644 --- a/docs/guide-es/tutorial-core-validators.md +++ b/docs/guide-es/tutorial-core-validators.md @@ -32,8 +32,8 @@ A continuación, vamos a describir el uso principal y las propiedades de cada va Este validador comprueba si el valor de la entrada (input) es booleano. -- ``true`Value`: El valor representando *`true`*. Valor por defecto a `'1'`. -- ``false`Value`: El valor representando *`false`*. Valor por defecto a `'0'`. +- `trueValue`: El valor representando `true`. Valor por defecto a `'1'`. +- `falseValue`: El valor representando `false`. Valor por defecto a `'0'`. - `strict`: Si el tipo del valor de la entrada (input) debe corresponder con `trueValue` y `falseValue`. Valor por defecto a `false`. diff --git a/docs/guide-fr/db-query-builder.md b/docs/guide-fr/db-query-builder.md index a9522bf23b..72eb5cf84e 100644 --- a/docs/guide-fr/db-query-builder.md +++ b/docs/guide-fr/db-query-builder.md @@ -277,7 +277,7 @@ $query->filterWhere([ La seule différence entre [[yii\db\Query::filterWhere()|filterWhere()]] et [[yii\db\Query::where()|where()]] est que la première ignore les valeurs vides fournies dans la condition au [format haché](#hash-format). Ainsi si `$email` est vide alors que `$username` ne l'est pas, le code ci dessus produit la condition SQL `WHERE username=:username`. -> Info: une valeur est considérée comme vide si elle est `null`e, un tableau vide, ou un chaîne de caractères vide, ou un chaîne de caractères constituée d'espaces uniquement. +> Info: une valeur est considérée comme vide si elle est nulle, un tableau vide, ou un chaîne de caractères vide, ou un chaîne de caractères constituée d'espaces uniquement. Comme avec [[yii\db\Query::andWhere()|andWhere()]] et [[yii\db\Query::orWhere()|orWhere()]], vous pouvez utiliser [[yii\db\Query::andFilterWhere()|andFilterWhere()]] et [[yii\db\Query::orFilterWhere()|orFilterWhere()]] pour ajouter des conditions de filtrage supplémentaires à une condition existante. diff --git a/docs/guide-id/intro-upgrade-from-v1.md b/docs/guide-id/intro-upgrade-from-v1.md index eb5015898f..df26874d4c 100644 --- a/docs/guide-id/intro-upgrade-from-v1.md +++ b/docs/guide-id/intro-upgrade-from-v1.md @@ -315,7 +315,7 @@ public function behaviors() 'access' => [ 'class' => 'yii\filters\AccessControl', 'rules' => [ - ['allow' => `true`, 'actions' => ['admin'], 'roles' => ['@']], + ['allow' => true, 'actions' => ['admin'], 'roles' => ['@']], ], ], ]; diff --git a/docs/guide-it/intro-upgrade-from-v1.md b/docs/guide-it/intro-upgrade-from-v1.md index f8c902fba9..2ecbb1616b 100644 --- a/docs/guide-it/intro-upgrade-from-v1.md +++ b/docs/guide-it/intro-upgrade-from-v1.md @@ -308,7 +308,7 @@ public function behaviors() 'access' => [ 'class' => 'yii\filters\AccessControl', 'rules' => [ - ['allow' => `true`, 'actions' => ['admin'], 'roles' => ['@']], + ['allow' => true, 'actions' => ['admin'], 'roles' => ['@']], ], ], ]; diff --git a/docs/guide/structure-widgets.md b/docs/guide/structure-widgets.md index fe1dbe7cf2..55ddb1f155 100644 --- a/docs/guide/structure-widgets.md +++ b/docs/guide/structure-widgets.md @@ -109,7 +109,7 @@ class HelloWidget extends Widget public function init() { parent::init(); - if ($this->message === `null`) { + if ($this->message === null) { $this->message = 'Hello World'; } } diff --git a/docs/guide/tutorial-console.md b/docs/guide/tutorial-console.md index 6317e9537b..0ab694e3bf 100644 --- a/docs/guide/tutorial-console.md +++ b/docs/guide/tutorial-console.md @@ -68,7 +68,7 @@ It contains code like the following: * Yii console bootstrap file. */ -defined('YII_DEBUG') or define('YII_DEBUG', `true`); +defined('YII_DEBUG') or define('YII_DEBUG', true); defined('YII_ENV') or define('YII_ENV', 'dev'); require(__DIR__ . '/vendor/autoload.php'); diff --git a/docs/guide/tutorial-core-validators.md b/docs/guide/tutorial-core-validators.md index 44e8f2e4f9..f188282fcd 100644 --- a/docs/guide/tutorial-core-validators.md +++ b/docs/guide/tutorial-core-validators.md @@ -27,15 +27,15 @@ In the following, we will describe the main usage and properties of every core v ['selected', 'boolean'], // checks if "deleted" is of boolean type, either `true` or `false` - ['deleted', 'boolean', '`true`Value' => `true`, '`false`Value' => `false`, 'strict' => `true`], + ['deleted', 'boolean', 'trueValue' => true, 'falseValue' => false, 'strict' => true], ] ``` This validator checks if the input value is a boolean. -- ``true`Value`: the value representing *`true`*. Defaults to `'1'`. -- ``false`Value`: the value representing *`false`*. Defaults to `'0'`. -- `strict`: whether the type of the input value should match that of ``true`Value` and ``false`Value`. Defaults to `false`. +- `trueValue`: the value representing `true`. Defaults to `'1'`. +- `falseValue`: the value representing `false`. Defaults to `'0'`. +- `strict`: whether the type of the input value should match that of `trueValue` and `falseValue`. Defaults to `false`. > Note: Because data input submitted via HTML forms are all strings, you normally should leave the @@ -105,7 +105,7 @@ you can use a combination of compare and date validator like the following: ```php ['fromDate', 'date', 'timestampAttribute' => 'fromDate'], ['toDate', 'date', 'timestampAttribute' => 'toDate'], -['fromDate', 'compare', 'compareAttribute' => 'toDate', 'operator' => '<', 'enableClientValidation' => `false`], +['fromDate', 'compare', 'compareAttribute' => 'toDate', 'operator' => '<', 'enableClientValidation' => false], ``` As validators are executed in the order they are specified this will first validate that the values entered in @@ -153,7 +153,7 @@ or `1970-01-01` in the input field of a date picker. ```php [ - [['from_date', 'to_date'], 'default', 'value' => `null`], + [['from_date', 'to_date'], 'default', 'value' => null], [['from_date', 'to_date'], 'date'], ], ``` @@ -271,7 +271,7 @@ This validator checks if the input value is a valid email address. ['a1', 'exist', 'targetAttribute' => ['a2', 'a1' => 'a3']], // a1 needs to exist. If a1 is an array, then every element of it must exist. - ['a1', 'exist', 'allowArray' => `true`], + ['a1', 'exist', 'allowArray' => true], ] ``` @@ -339,7 +339,7 @@ section for complete coverage about uploading files and performing validation ab ```php [ // trim "username" and "email" inputs - [['username', 'email'], 'filter', 'filter' => 'trim', 'skipOnArray' => `true`], + [['username', 'email'], 'filter', 'filter' => 'trim', 'skipOnArray' => true], // normalize "phone" input ['phone', 'filter', 'filter' => function ($value) { @@ -400,11 +400,11 @@ validation purpose: // checks if "ip_address" is a valid IPv6 address or subnet, // value will be expanded to full IPv6 notation. - ['ip_address', 'ip', 'ipv4' => `false`, 'subnet' => `null`, 'expandIPv6' => `true`], + ['ip_address', 'ip', 'ipv4' => false, 'subnet' => null, 'expandIPv6' => true], // checks if "ip_address" is a valid IPv4 or IPv6 address, // allows negation character `!` at the beginning - ['ip_address', 'ip', 'negation' => `true`], + ['ip_address', 'ip', 'negation' => true], ] ``` diff --git a/docs/guide/tutorial-i18n.md b/docs/guide/tutorial-i18n.md index ed6bad36c4..8de8ce6e9b 100644 --- a/docs/guide/tutorial-i18n.md +++ b/docs/guide/tutorial-i18n.md @@ -496,7 +496,7 @@ class Module extends \yii\base\Module ]; } - public static function t($category, $message, $params = [], $language = `null`) + public static function t($category, $message, $params = [], $language = null) { return Yii::t('modules/users/' . $category, $message, $params, $language); } @@ -547,7 +547,7 @@ class Menu extends Widget echo $this->render('index'); } - public static function t($category, $message, $params = [], $language = `null`) + public static function t($category, $message, $params = [], $language = null) { return Yii::t('widgets/menu/' . $category, $message, $params, $language); } diff --git a/docs/guide/tutorial-performance-tuning.md b/docs/guide/tutorial-performance-tuning.md index ab30754092..f3e7938813 100644 --- a/docs/guide/tutorial-performance-tuning.md +++ b/docs/guide/tutorial-performance-tuning.md @@ -27,7 +27,7 @@ You may place the following line of code at the beginning of the [entry script]( disable debug mode: ```php -defined('YII_DEBUG') or define('YII_DEBUG', `false`); +defined('YII_DEBUG') or define('YII_DEBUG', false); ``` > Info: The default value of `YII_DEBUG` is `false`. So if you are certain that you do not change its default @@ -66,7 +66,7 @@ return [ 'dsn' => 'mysql:host=localhost;dbname=mydatabase', 'username' => 'root', 'password' => '', - 'enableSchemaCache' => `true`, + 'enableSchemaCache' => true, // Duration of schema cache. 'schemaCacheDuration' => 3600, @@ -121,7 +121,7 @@ component as the database connection and store the session data in the `session` ```sql CREATE TABLE session ( - id CHAR(40) NOT `NULL` PRIMARY KEY, + id CHAR(40) NOT NULL PRIMARY KEY, expire INTEGER, data BLOB ) diff --git a/docs/guide/tutorial-template-engines.md b/docs/guide/tutorial-template-engines.md index c287341448..3c6b56e4be 100644 --- a/docs/guide/tutorial-template-engines.md +++ b/docs/guide/tutorial-template-engines.md @@ -22,7 +22,7 @@ component's behavior: 'cachePath' => '@runtime/Twig/cache', // Array of twig options: 'options' => [ - 'auto_reload' => `true`, + 'auto_reload' => true, ], 'globals' => ['html' => '\yii\helpers\Html'], 'uses' => ['yii\bootstrap'],