[TYPO3-dev]  Small PhpStorm hint for devs
    Dmitry Dulepov 
    dmitry.dulepov at gmail.com
       
    Fri Mar 11 09:57:41 CET 2011
    
    
  
Hi!
If you use PhpStorm, most likely you love its autocomplete feature :) In 
many cases you can activate autocomplete when returning a parameter from 
the function:
/**
  * ...
  *
  * @return tx_class
  */
function foo() {
	return t3lib_div::makeInstance(...);
}
But what if you need to return an array? In the usual phpDoc you just write 
"@return array". But this does not give you autocomplete. With PhpStorm do 
this instead:
/**
  * ...
  *
  * @return tx_class[]
  */
function foo() {
	return array(
		t3lib_div::makeInstance(...),
		t3lib_div::makeInstance(...)
	);
}
Voila! You have autocomplete now for arrays too :)
-- 
Dmitry Dulepov
TYPO3 core&security team member
E-mail: dmitry.dulepov at typo3.org
Web: http://dmitry-dulepov.com/
    
    
More information about the TYPO3-dev
mailing list