We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I have a var called $app, its a class \Silex\Application that implements ArrayAccess.
$app
\Silex\Application
ArrayAccess
then inside that $app array there is twig key which is an object of \Twig\Environment So in source code i use it like this
twig
\Twig\Environment
$app['twig']->render('stuff');
How to enable auto completion for $app['twig'] to show render function? How to setup this in .phpstorm.meta.php?
$app['twig']
render
.phpstorm.meta.php
Thanks
The text was updated successfully, but these errors were encountered:
Hi. ArrayAccess completion is not supported. See #102
Need a PR or something for this feature.
Sorry, something went wrong.
You could possibly trick the plugin into thinking that $app is an associative array by doing something like this:
/** @var $app = ['twig' => new \Twig\Environment()] */ $app = new \Silex\Application();
The plugin will consider $app type a union of associative array and class instance in such case if I remember right how it works.
This PSALM annotation should probably work as well:
/** @var \Silex\Application|array{twig: \Twig\Environment} $app */ $app = something();
No branches or pull requests
Hi,
I have a var called
$app
, its a class\Silex\Application
that implementsArrayAccess
.then inside that
$app
array there istwig
key which is an object of\Twig\Environment
So in source code i use it like this
How to enable auto completion for
$app['twig']
to showrender
function?How to setup this in
.phpstorm.meta.php
?Thanks
The text was updated successfully, but these errors were encountered: