I am using Yii2 framework in PhpStorm.
My problem arises in views when I am using $this->render
function to include another code of snippet inside my main file with some variables.
The code itself works perfectly I just have a problem with highlightings.
This is my code:
<?php
echo $this->render('commentsBlock', [
"comments" => $comments,
'deleteURL' => $deleteURL,
'editURL' => $editURL,
]);
?>
The code above renders commentsBlock.php and content of that target file is below:
As you can see the PhpStorm thinks that variables are not declared when they are defined.
I know that I need to add some comment which tells the IDE that vars do exist but what I tried did not work so far.
I did this:
But it is not highlighting.
Any ideas on how to write properly this comment section to trick IDE to highlight my variables?