Answer the question
In order to leave comments, you need to log in
How to set the type of the $this variable for autocomplete?
Hello!
How to define $this variable for phpstorm to autocomplete?
Code example
$app->get( '/auth/:action', function( $action ) {
// $this === $app
/** @var $this App */
return $this->view->render( "auth.php" );
} );
/** @var $this App */
- I know this method, but is it possible to somehow do without it? use ( $app )
also not an option. Answer the question
In order to leave comments, you need to log in
You don't need to name the variable by that name. This will confuse people.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question