method not found in string

Anything I can do to tell phpstorm I know what i'm doing.  I'm working primarily with joomla & it's extensions and it frequently throws errors/warning similar to 

0

Hi there,

What is $params? Specify a better typehint if it does not have any, e.g. inline one:

/** @var MyClass $params */

As I understand (not a Joomla user) for whatever reason IDE treats $params as a string.

 

0

$params is an array

0

>$params is an array

Then how do you call a get() method on array (e.g. [1,2,3]->get()???)

Use Xdebug and see what the real type is (or a simple plain var_dump() or any other approach) and typehint that $params variable accordingly.

0

请先登录再写评论。