2011-09-01 4 views
1

을 지원 코드에서 작동하지 @return,하지만 내 문제가 해결되지 않은 : ... 자신의 예제의 PHP에 상응를 사용 Aptana Scriptdoc doesn't show up in Code AssistAptana를 3 ScriptDoc - 내가 대답했다이 질문을 발견

이 (추가 끝 괄호 포함)처럼
/** 
* 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]; 
} 

그러나, 제공 documenation 보인다 :

getFoo($fooId) 
Gets the current foo 

@param String $fooId The unique identifier for the foo. 
@return Object} 
Resolved return types: Object} 

날 내가 잘못 뭘하는지 알려 주시기 바랍니다.

감사합니다.

답변

2

@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]; 
} 

구문 분석이 PHPDoc @return rules 다음과 같습니다.

이것은 또한 여러 유형의 코드 지원 제안을 제공하는 리턴 값이 혼합 될 수 있음을 의미합니다.

:

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

건배

관련 문제