Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/244.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Aptana 3 ScriptDoc-@返回不在代码辅助中工作_Php_Aptana - Fatal编程技术网

Php Aptana 3 ScriptDoc-@返回不在代码辅助中工作

Php Aptana 3 ScriptDoc-@返回不在代码辅助中工作,php,aptana,Php,Aptana,我发现这个问题已经得到了回答,但并没有解决我的问题: 使用与他们的示例相当的PHP /** * Gets the current foo * @param {String} $fooId The unique identifier for the foo. * @return {Object} Returns the current foo. */ public function getFoo($fooId) { return $bar[$fooId]; } 但是,提供的文

我发现这个问题已经得到了回答,但并没有解决我的问题:

使用与他们的示例相当的PHP

/**
 * Gets the current foo
 * @param {String} $fooId The unique identifier for the foo.
 * @return {Object} Returns the current foo. 
 */
public function getFoo($fooId) {
    return $bar[$fooId];
}
但是,提供的文档如下所示(包括额外的尾端大括号):

请让我知道我做错了什么


谢谢

@return类型不应该用花括号括起来

您的文档应如下所示:

/**
 * Gets the current foo
 * @param String $fooId The unique identifier for the foo.
 * @return Object Returns the current foo. 
 */
public function getFoo($fooId) {
    return $bar[$fooId];
}
返回类型的解析遵循

这也意味着您可以使用混合返回类型,这将为您提供来自多个类型的代码辅助建议

例如:

/**
 * @return MyClass|PDO doc doc doc 
 */
干杯

/**
 * @return MyClass|PDO doc doc doc 
 */