diff --git a/docs/guide-fr/structure-views.md b/docs/guide-fr/structure-views.md
index 51722c68f9c..53f245824c7 100644
--- a/docs/guide-fr/structure-views.md
+++ b/docs/guide-fr/structure-views.md
@@ -16,9 +16,11 @@ Comme nous l'avons dit ci-dessus, une vue n'est rien d'autre qu'un script PHP in
use yii\helpers\Html;
use yii\widgets\ActiveForm;
-/* @var $this yii\web\View */
-/* @var $form yii\widgets\ActiveForm */
-/* @var $model app\models\LoginForm */
+/**
+ * @var \yii\web\View $this
+ * @var \yii\widgets\ActiveForm $form
+ * @var \app\models\LoginForm $model
+ */
$this->title = 'Login';
?>
@@ -262,8 +264,10 @@ L'exemple qui suit montre à quoi ressemble une disposition. Notez que dans un b
beginPage() ?>
diff --git a/docs/guide-ja/input-forms.md b/docs/guide-ja/input-forms.md
index c955fbdda1d..471f70366a0 100644
--- a/docs/guide-ja/input-forms.md
+++ b/docs/guide-ja/input-forms.md
@@ -162,7 +162,7 @@ $items = Category::find()
ActiveField の [[\yii\widgets\ActiveField::dropDownList()]] メソッドを使って、ドロップダウン・リストを作ることが出来ます。
```php
-/* @var $form yii\widgets\ActiveForm */
+/** @var \yii\widgets\ActiveForm $form */
echo $form->field($model, 'category')->dropdownList([
1 => '項目 1',
@@ -177,7 +177,7 @@ echo $form->field($model, 'category')->dropdownList([
ActiveField の [[\yii\widgets\ActiveField::radioList()]] メソッドを使ってラジオ・リストを作ることが出来ます。
```php
-/* @var $form yii\widgets\ActiveForm */
+/** @var \yii\widgets\ActiveForm $form */
echo $form->field($model, 'category')->radioList([
1 => 'ラジオ 1',
@@ -190,7 +190,7 @@ echo $form->field($model, 'category')->radioList([
ActiveField の [[\yii\widgets\ActiveField::checkboxList()]] メソッドを使ってチェックボックス・リストを作ることが出来ます。
```php
-/* @var $form yii\widgets\ActiveForm */
+/** @var \yii\widgets\ActiveForm $form */
echo $form->field($model, 'category')->checkboxList([
1 => 'チェックボックス 1',
diff --git a/docs/guide-ja/output-data-widgets.md b/docs/guide-ja/output-data-widgets.md
index b4dd7d4a05c..e3f7a85d9eb 100644
--- a/docs/guide-ja/output-data-widgets.md
+++ b/docs/guide-ja/output-data-widgets.md
@@ -473,9 +473,11 @@ echo GridView::widget([
use yii\helpers\Html;
use yii\widgets\ActiveForm;
-/* @var $this yii\web\View */
-/* @var $model app\models\PostSearch */
-/* @var $form yii\widgets\ActiveForm */
+/**
+ * @var \yii\web\View $this
+ * @var \app\models\PostSearch $model
+ * @var \yii\widgets\ActiveForm $form
+ */
?>
diff --git a/docs/guide-ja/structure-views.md b/docs/guide-ja/structure-views.md
index 5b427ed0e26..e0767926bf4 100644
--- a/docs/guide-ja/structure-views.md
+++ b/docs/guide-ja/structure-views.md
@@ -20,9 +20,11 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;
-/* @var $this yii\web\View */
-/* @var $form yii\widgets\ActiveForm */
-/* @var $model app\models\LoginForm */
+/**
+ * @var \yii\web\View $this
+ * @var \yii\widgets\ActiveForm $form
+ * @var \app\models\LoginForm $model
+ */
$this->title = 'ログイン';
?>
@@ -324,8 +326,10 @@ $this->params['breadcrumbs'][] = 'About Us';
beginPage() ?>
diff --git a/docs/guide-ja/tutorial-mailing.md b/docs/guide-ja/tutorial-mailing.md
index 1f7ec10f362..831d3372584 100644
--- a/docs/guide-ja/tutorial-mailing.md
+++ b/docs/guide-ja/tutorial-mailing.md
@@ -96,8 +96,10 @@ Yii は実際のメール・メッセージを特別なビュー・ファイル
use yii\helpers\Html;
use yii\helpers\Url;
-/* @var $this \yii\web\View ビュー・コンポーネントのインスタンス */
-/* @var $message \yii\mail\BaseMessage 新しく作成されたメール・メッセージのインスタンス */
+/**
+ * @var \yii\web\View $this ビュー・コンポーネントのインスタンス
+ * @var \yii\mail\BaseMessage $message 新しく作成されたメール・メッセージのインスタンス
+ */
?>
ワン・クリックで私たちのサイトのホームページを訪問することが出来ます
@@ -143,9 +145,11 @@ Yii::$app->mailer->compose([
beginPage() ?>
diff --git a/docs/guide-pl/input-forms.md b/docs/guide-pl/input-forms.md
index f50d7861a1d..a2bd7c00869 100644
--- a/docs/guide-pl/input-forms.md
+++ b/docs/guide-pl/input-forms.md
@@ -151,7 +151,7 @@ Wartość pola formularza (i aktualnie aktywny element) będzie automatycznie us
Możemy użyć metody klasy ActiveForm [[yii\widgets\ActiveForm::dropDownList()|dropDownList()]] do utworzenia rozwijanej listy:
```php
-/* @var $form yii\widgets\ActiveForm */
+/** @var \yii\widgets\ActiveForm $form */
echo $form->field($model, 'category')->dropdownList([
1 => 'item 1',
@@ -166,7 +166,7 @@ echo $form->field($model, 'category')->dropdownList([
Do stworzenia takiej listy możemy użyć metody ActiveField [[\yii\widgets\ActiveField::radioList()]]:
```php
-/* @var $form yii\widgets\ActiveForm */
+/** @var \yii\widgets\ActiveForm $form */
echo $form->field($model, 'category')->radioList([
1 => 'radio 1',
@@ -179,7 +179,7 @@ echo $form->field($model, 'category')->radioList([
Do stworzenia takiej listy możemy użyć metody ActiveField [[\yii\widgets\ActiveField::checkboxList()]]:
```php
-/* @var $form yii\widgets\ActiveForm */
+/** @var \yii\widgets\ActiveForm $form */
echo $form->field($model, 'category')->checkboxList([
1 => 'checkbox 1',
diff --git a/docs/guide-pl/tutorial-mailing.md b/docs/guide-pl/tutorial-mailing.md
index 48b2c0306a5..e840610b4c6 100644
--- a/docs/guide-pl/tutorial-mailing.md
+++ b/docs/guide-pl/tutorial-mailing.md
@@ -90,8 +90,10 @@ use yii\helpers\Html;
use yii\helpers\Url;
-/* @var $this \yii\web\View instancja komponentu View */
-/* @var $message \yii\mail\BaseMessage instancja nowo utworzonej wiadomości email */
+/**
+ * @var \yii\web\View $this instancja komponentu View
+ * @var \yii\mail\BaseMessage $message instancja nowo utworzonej wiadomości email
+ */
?>
Ta wiadomość pozwala Ci odwiedzić stronę główną naszej witryny przez jedno kliknięcie
@@ -138,9 +140,11 @@ Szalony mogą zostać użyte do ustawienia styli CSS, lub innej wspólnej treśc
beginPage() ?>
@@ -223,4 +227,4 @@ Aby utworzyć swoje własne rozwiązanie mailingowe, musisz utworzyć dwie klasy
Możesz rozszerzyć klasy [[yii\mail\BaseMailer|BaseMailer]] i [[yii\mail\BaseMessage|BaseMessage]] jako bazowe klasy do tego rozwiązania.
Zawierają one podstawową logikę mechanizmu mailingu, który został opisany w tej sekcji.
Oczywiście ich użycie nie jest obowiązkowe, wystarczy zaimplementowanie interfejsów [[yii\mail\MailerInterface|MailerInterface]] oraz [[yii\mail\MessageInterface|MessageInterface]].
-Następnie musisz zaimplementować wszystkie abstrakcyjne metody do swoich klas.
\ No newline at end of file
+Następnie musisz zaimplementować wszystkie abstrakcyjne metody do swoich klas.
diff --git a/docs/guide-pt-BR/structure-views.md b/docs/guide-pt-BR/structure-views.md
index cd26141465e..97a5ed78d5f 100644
--- a/docs/guide-pt-BR/structure-views.md
+++ b/docs/guide-pt-BR/structure-views.md
@@ -24,9 +24,11 @@ as partes de conteúdo dinâmicas, tais como o título da página e o formulári
use yii\helpers\Html;
use yii\widgets\ActiveForm;
-/* @var $this yii\web\View */
-/* @var $form yii\widgets\ActiveForm */
-/* @var $model app\models\LoginForm */
+/**
+ * @var \yii\web\View $this
+ * @var \yii\widgets\ActiveForm $form
+ * @var \app\models\LoginForm $model
+ */
$this->title = 'Login';
?>
@@ -365,8 +367,10 @@ como tags no head, menu principal, etc.
beginPage() ?>
diff --git a/docs/guide-ru/input-forms.md b/docs/guide-ru/input-forms.md
index 76718407d45..42a8d55a9ad 100644
--- a/docs/guide-ru/input-forms.md
+++ b/docs/guide-ru/input-forms.md
@@ -114,9 +114,11 @@ echo $form->field($model, 'items[]')->checkboxList(['a' => 'Item A', 'b' => 'Ite
```php
use app\models\ProductCategory;
-/* @var $this yii\web\View */
-/* @var $form yii\widgets\ActiveForm */
-/* @var $model app\models\Product */
+/**
+ * @var \yii\web\View $this
+ * @var \yii\widgets\ActiveForm $form
+ * @var \app\models\Product $model
+ */
echo $form->field($model, 'product_category')->dropdownList(
ProductCategory::find()->select(['category_name', 'id'])->indexBy('id')->column(),
diff --git a/docs/guide-ru/output-data-widgets.md b/docs/guide-ru/output-data-widgets.md
index 5e936f7937f..46872066a68 100644
--- a/docs/guide-ru/output-data-widgets.md
+++ b/docs/guide-ru/output-data-widgets.md
@@ -451,9 +451,11 @@ echo GridView::widget([
use yii\helpers\Html;
use yii\widgets\ActiveForm;
-/* @var $this yii\web\View */
-/* @var $model app\models\PostSearch */
-/* @var $form yii\widgets\ActiveForm */
+/**
+ * @var \yii\web\View $this
+ * @var \app\models\PostSearch $model
+ * @var \yii\widgets\ActiveForm $form
+ */
?>
diff --git a/docs/guide-ru/structure-views.md b/docs/guide-ru/structure-views.md
index c2903821691..4a752d49d12 100644
--- a/docs/guide-ru/structure-views.md
+++ b/docs/guide-ru/structure-views.md
@@ -16,9 +16,11 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;
-/* @var $this yii\web\View */
-/* @var $form yii\widgets\ActiveForm */
-/* @var $model app\models\LoginForm */
+/**
+ * @var \yii\web\View $this
+ * @var \yii\widgets\ActiveForm $form
+ * @var \app\models\LoginForm $model
+ */
$this->title = 'Вход';
?>
@@ -269,8 +271,10 @@ $this->params['breadcrumbs'][] = 'О нас';
beginPage() ?>
diff --git a/docs/guide-ru/tutorial-mailing.md b/docs/guide-ru/tutorial-mailing.md
index de43809203c..8208b81180f 100644
--- a/docs/guide-ru/tutorial-mailing.md
+++ b/docs/guide-ru/tutorial-mailing.md
@@ -90,8 +90,10 @@ use yii\helpers\Html;
use yii\helpers\Url;
-/* @var $this \yii\web\View view component instance */
-/* @var $message \yii\mail\BaseMessage instance of newly created mail message */
+/**
+ * @var \yii\web\View $this view component instance
+ * @var \yii\mail\BaseMessage $message instance of newly created mail message
+ */
?>
This message allows you to visit our site home page by one click
@@ -136,9 +138,11 @@ Yii::$app->mailer->compose([
beginPage() ?>
diff --git a/docs/guide-uk/structure-views.md b/docs/guide-uk/structure-views.md
index c529593f680..6cb37d1a31d 100644
--- a/docs/guide-uk/structure-views.md
+++ b/docs/guide-uk/structure-views.md
@@ -20,9 +20,11 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;
-/* @var $this yii\web\View */
-/* @var $form yii\widgets\ActiveForm */
-/* @var $model app\models\LoginForm */
+/**
+ * @var \yii\web\View $this
+ * @var \yii\widgets\ActiveForm $form
+ * @var \app\models\LoginForm $model
+ */
$this->title = 'Вхід';
?>
@@ -324,8 +326,10 @@ $this->params['breadcrumbs'][] = 'Про нас';
beginPage() ?>
diff --git a/docs/guide-vi/structure-views.md b/docs/guide-vi/structure-views.md
index 285d2c6f60c..64269d82131 100644
--- a/docs/guide-vi/structure-views.md
+++ b/docs/guide-vi/structure-views.md
@@ -19,9 +19,11 @@ và các nội dung form, còn các mã HTML tổ chức thành các trang nội
use yii\helpers\Html;
use yii\widgets\ActiveForm;
-/* @var $this yii\web\View */
-/* @var $form yii\widgets\ActiveForm */
-/* @var $model app\models\LoginForm */
+/**
+ * @var \yii\web\View $this
+ * @var \yii\widgets\ActiveForm $form
+ * @var \app\models\LoginForm $model
+ */
$this->title = 'Login';
?>
@@ -321,8 +323,10 @@ vào layout. Tuy nhiên trong thực tế, bạn có thể thêm nhiều nội d
beginPage() ?>
diff --git a/docs/guide-zh-CN/input-forms.md b/docs/guide-zh-CN/input-forms.md
index b4e640cbd17..5e056a8876a 100644
--- a/docs/guide-zh-CN/input-forms.md
+++ b/docs/guide-zh-CN/input-forms.md
@@ -162,7 +162,7 @@ $items = Category::find()
我们可以使用 ActiveField [[\yii\widgets\ActiveField::dropDownList()]] 方法创建一个下拉列表:
```php
-/* @var $form yii\widgets\ActiveForm */
+/** @var \yii\widgets\ActiveForm $form */
echo $form->field($model, 'category')->dropdownList([
1 => 'item 1',
@@ -177,7 +177,7 @@ echo $form->field($model, 'category')->dropdownList([
我们可以使用 ActiveField [[\yii\widgets\ActiveField::radioList()]] 方法创建一个单选列表:
```php
-/* @var $form yii\widgets\ActiveForm */
+/** @var \yii\widgets\ActiveForm $form */
echo $form->field($model, 'category')->radioList([
1 => 'radio 1',
@@ -190,7 +190,7 @@ echo $form->field($model, 'category')->radioList([
我们可以使用 ActiveField [[\yii\widgets\ActiveField::checkboxList()]] 方法创建一个复选框列表:
```php
-/* @var $form yii\widgets\ActiveForm */
+/** @var \yii\widgets\ActiveForm $form */
echo $form->field($model, 'category')->checkboxList([
1 => 'checkbox 1',
diff --git a/docs/guide-zh-CN/output-data-widgets.md b/docs/guide-zh-CN/output-data-widgets.md
index 0fc2e00d48c..6740800cae3 100644
--- a/docs/guide-zh-CN/output-data-widgets.md
+++ b/docs/guide-zh-CN/output-data-widgets.md
@@ -472,9 +472,11 @@ echo GridView::widget([
use yii\helpers\Html;
use yii\widgets\ActiveForm;
-/* @var $this yii\web\View */
-/* @var $model app\models\PostSearch */
-/* @var $form yii\widgets\ActiveForm */
+/**
+ * @var \yii\web\View $this
+ * @var \app\models\PostSearch $model
+ * @var \yii\widgets\ActiveForm $form
+ */
?>
diff --git a/docs/guide-zh-CN/structure-views.md b/docs/guide-zh-CN/structure-views.md
index b7634e758f2..8198693069e 100644
--- a/docs/guide-zh-CN/structure-views.md
+++ b/docs/guide-zh-CN/structure-views.md
@@ -20,9 +20,11 @@ HTML代码把它组织成一个漂亮的HTML页面。
use yii\helpers\Html;
use yii\widgets\ActiveForm;
-/* @var $this yii\web\View */
-/* @var $form yii\widgets\ActiveForm */
-/* @var $model app\models\LoginForm */
+/**
+ * @var \yii\web\View $this
+ * @var \yii\widgets\ActiveForm $form
+ * @var \app\models\LoginForm $model
+ */
$this->title = 'Login';
?>
@@ -324,8 +326,10 @@ $this->params['breadcrumbs'][] = 'About Us';
beginPage() ?>
diff --git a/docs/guide-zh-CN/tutorial-mailing.md b/docs/guide-zh-CN/tutorial-mailing.md
index b0daf2a80ba..d1b35bef94d 100644
--- a/docs/guide-zh-CN/tutorial-mailing.md
+++ b/docs/guide-zh-CN/tutorial-mailing.md
@@ -92,8 +92,10 @@ Yii 允许通过特殊的视图文件来撰写实际的邮件内容。默认情
use yii\helpers\Html;
use yii\helpers\Url;
-/* @var $this \yii\web\View view component instance */
-/* @var $message \yii\mail\BaseMessage instance of newly created mail message */
+/**
+ * @var \yii\web\View $this view component instance
+ * @var \yii\mail\BaseMessage $message instance of newly created mail message
+ */
?>
This message allows you to visit our site home page by one click
@@ -139,9 +141,11 @@ Yii::$app->mailer->compose([
beginPage() ?>
diff --git a/docs/guide/input-forms.md b/docs/guide/input-forms.md
index b7712f56201..77f598c2c6e 100644
--- a/docs/guide/input-forms.md
+++ b/docs/guide/input-forms.md
@@ -162,7 +162,7 @@ by the current value of the `$model`'s attribute.
We can use ActiveField [[\yii\widgets\ActiveField::dropDownList()]] method to create a drop-down list:
```php
-/* @var $form yii\widgets\ActiveForm */
+/** @var \yii\widgets\ActiveForm $form */
echo $form->field($model, 'category')->dropdownList([
1 => 'item 1',
@@ -177,7 +177,7 @@ echo $form->field($model, 'category')->dropdownList([
We can use ActiveField [[\yii\widgets\ActiveField::radioList()]] method to create a radio list:
```php
-/* @var $form yii\widgets\ActiveForm */
+/** @var \yii\widgets\ActiveForm $form */
echo $form->field($model, 'category')->radioList([
1 => 'radio 1',
@@ -190,7 +190,7 @@ echo $form->field($model, 'category')->radioList([
We can use ActiveField [[\yii\widgets\ActiveField::checkboxList()]] method to create a checkbox list:
```php
-/* @var $form yii\widgets\ActiveForm */
+/** @var \yii\widgets\ActiveForm $form */
echo $form->field($model, 'category')->checkboxList([
1 => 'checkbox 1',
diff --git a/docs/guide/output-data-widgets.md b/docs/guide/output-data-widgets.md
index da43b234d88..4e71183484f 100644
--- a/docs/guide/output-data-widgets.md
+++ b/docs/guide/output-data-widgets.md
@@ -473,9 +473,11 @@ you can easily add it as well. You can create partial view `_search.php` with th
use yii\helpers\Html;
use yii\widgets\ActiveForm;
-/* @var $this yii\web\View */
-/* @var $model app\models\PostSearch */
-/* @var $form yii\widgets\ActiveForm */
+/**
+ * @var \yii\web\View $this
+ * @var \app\models\PostSearch $model
+ * @var \yii\widgets\ActiveForm $form
+ */
?>
diff --git a/docs/guide/structure-views.md b/docs/guide/structure-views.md
index 12254cedf7d..b52d708a601 100644
--- a/docs/guide/structure-views.md
+++ b/docs/guide/structure-views.md
@@ -20,9 +20,11 @@ page title and the form, while HTML code organizes them into a presentable HTML
use yii\helpers\Html;
use yii\widgets\ActiveForm;
-/* @var $this yii\web\View */
-/* @var $form yii\widgets\ActiveForm */
-/* @var $model app\models\LoginForm */
+/**
+ * @var \yii\web\View $this
+ * @var \yii\widgets\ActiveForm $form
+ * @var \app\models\LoginForm $model
+ */
$this->title = 'Login';
?>
@@ -324,8 +326,10 @@ the code in the layout. In practice, you may want to add more content to it, suc
beginPage() ?>
diff --git a/docs/guide/tutorial-mailing.md b/docs/guide/tutorial-mailing.md
index 71b543f43a7..f7ca98aaab9 100644
--- a/docs/guide/tutorial-mailing.md
+++ b/docs/guide/tutorial-mailing.md
@@ -96,8 +96,10 @@ Example mail view file content:
use yii\helpers\Html;
use yii\helpers\Url;
-/* @var $this \yii\web\View view component instance */
-/* @var $message \yii\mail\BaseMessage instance of newly created mail message */
+/**
+ * @var \yii\web\View $this view component instance
+ * @var \yii\mail\BaseMessage $message instance of newly created mail message
+ */
?>
This message allows you to visit our site home page by one click
@@ -143,9 +145,11 @@ Layout can be used to setup mail CSS styles or other shared content:
beginPage() ?>
diff --git a/docs/internals-ja/view-code-style.md b/docs/internals-ja/view-code-style.md
index 3c39c56b924..50f8f1ac759 100644
--- a/docs/internals-ja/view-code-style.md
+++ b/docs/internals-ja/view-code-style.md
@@ -8,10 +8,12 @@ Yii 2 ビュー・コード・スタイル
// 冒頭の PHP タグは全てのテンプレート・ファイルで不可欠。冒頭のタグに続く空行も同じく必須。
// コントローラから渡される入力変数をここで説明。
-/* @var $this yii\base\View */
-/* @var $form yii\widgets\ActiveForm */
-/* @var $posts app\models\Post[] */
-/* @var $contactMessage app\models\ContactMessage */
+/**
+ * @var \yii\base\View $this
+ * @var \yii\widgets\ActiveForm $form
+ * @var \app\models\Post[] $posts
+ * @var \app\models\ContactMessage $contactMessage
+ */
// 下の空行は必要。
// 名前空間に属するクラスの宣言。
diff --git a/docs/internals-pl/view-code-style.md b/docs/internals-pl/view-code-style.md
index f4f49579c87..75273106926 100644
--- a/docs/internals-pl/view-code-style.md
+++ b/docs/internals-pl/view-code-style.md
@@ -8,10 +8,12 @@ Poniższy styl kodowania jest stosowany w kodzie frameworka Yii 2.x i oficjalnyc
// Rozpoczynający tag PHP jest wymagany w każdym pliku szablonu. Pusta linia za rozpoczynającym tagiem jest również wymagana.
// Opisz zmienne przekazane z kontrolera w tym miejscu.
-/* @var $this yii\base\View */
-/* @var $form yii\widgets\ActiveForm */
-/* @var $posts app\models\Post[] */
-/* @var $contactMessage app\models\ContactMessage */
+/**
+ * @var \yii\base\View $this
+ * @var \yii\widgets\ActiveForm $form
+ * @var \app\models\Post[] $posts
+ * @var \app\models\ContactMessage $contactMessage
+ */
// Pusta linia poniżej jest wymagana.
// Deklaracje klas z przestrzeniami nazw.
diff --git a/docs/internals-ru/view-code-style.md b/docs/internals-ru/view-code-style.md
index 50cc39887ab..9f7384b4b2c 100644
--- a/docs/internals-ru/view-code-style.md
+++ b/docs/internals-ru/view-code-style.md
@@ -10,10 +10,12 @@
// Открывающий PHP тег должен быть в каждом файле шаблона. Пустая строка после открывающего тега также необходима.
// Описывайте входные переменные, переданные сюда контроллером.
-/* @var $this yii\base\View */
-/* @var $form yii\widgets\ActiveForm */
-/* @var $posts app\models\Post[] */
-/* @var $contactMessage app\models\ContactMessage */
+/**
+ * @var \yii\base\View $this
+ * @var \yii\widgets\ActiveForm $form
+ * @var \app\models\Post[] $posts
+ * @var \app\models\ContactMessage $contactMessage
+ */
// Пустая строка ниже необходима.
// Описание классов с пространствами имён.
diff --git a/docs/internals-uk/view-code-style.md b/docs/internals-uk/view-code-style.md
index 0e5ee91b898..90dcd2b03cf 100644
--- a/docs/internals-uk/view-code-style.md
+++ b/docs/internals-uk/view-code-style.md
@@ -9,10 +9,12 @@
// Початковий тег PHP, за яким йде пустий рядок, є обовʼязковим для усіх файлів шаблонів.
// Опис вхідних змінних, які передає контролер.
-/* @var $this yii\base\View */
-/* @var $form yii\widgets\ActiveForm */
-/* @var $posts app\models\Post[] */
-/* @var $contactMessage app\models\ContactMessage */
+/**
+ * @var \yii\base\View $this
+ * @var \yii\widgets\ActiveForm $form
+ * @var \app\models\Post[] $posts
+ * @var \app\models\ContactMessage $contactMessage
+ */
// Пустий рядок після є необхідним.
// Декларування класів з просторів імен.
diff --git a/docs/internals/view-code-style.md b/docs/internals/view-code-style.md
index 4658db31326..37a74cc7b26 100644
--- a/docs/internals/view-code-style.md
+++ b/docs/internals/view-code-style.md
@@ -8,10 +8,12 @@ The following code style is used for Yii 2.x core and official extensions view f
// Leading PHP tag is a must in every template file. Empty line after leading PHP tag is also required.
// Describe input variables passed by controller here.
-/* @var $this yii\base\View */
-/* @var $form yii\widgets\ActiveForm */
-/* @var $posts app\models\Post[] */
-/* @var $contactMessage app\models\ContactMessage */
+/**
+ * @var \yii\base\View $this
+ * @var \yii\widgets\ActiveForm $form
+ * @var \app\models\Post[] $posts
+ * @var \app\models\ContactMessage $contactMessage
+ */
// Empty line below is necessary.
// Namespaced classes declaration.