PHP Specify the Return Type Hints for a Method

后端 未结 5 1081
庸人自扰
庸人自扰 2021-01-07 23:18

What is the correct syntax for me to specify the return type hints for a method?

For example, I have such a method:

private static function Construct         


        
5条回答
  •  花落未央
    2021-01-07 23:42

    The IDE hinting is done via comments. Here is an example from one of my ZEND Front Plugins.

    setStorage(new My_AuthStorage($session));
        return $auth;
    }
    

提交回复
热议问题