- Affected version
- 2.2.0
Mostly phpstorm/intellij can infer the return types for various helper methods in
Without docblock or return types, this causes phpstorm to incorrectly infer the possible return types too narrowly when possible
Something like;
XF\Mvc\Controller
but there are a couple methods which can't be inferred without either php7 return types of docblock or additional configuration (php metadata which can be expensive or hard to use with multiple add-ons/XF)Without docblock or return types, this causes phpstorm to incorrectly infer the possible return types too narrowly when possible
noPermission
/notFound
are called as these can return view/error/message types.Something like;
PHP:
/**
* @param \XF\Phrase|string|null $message
* @return \XF\Mvc\Reply\AbstractReply
*/
public function noPermission($message = null)
{
return $this->plugin('XF:Error')->actionNoPermission($message);
}
/**
* @param \XF\Phrase|string|null $message
* @return \XF\Mvc\Reply\AbstractReply
*/
public function notFound($message = null)
{
return $this->plugin('XF:Error')->actionNotFound($message);
}