Implement inline @var syntax.
Sometimes, you know for a fact that some function returns a certain type. However, type hinting won't work because the function is too generic for that. For example, with the ZF2 ServiceManager:
<?php
use My\Job;
$job = $sm->get(Job::class);
/* @var $job Job */
$job->...
In this case, it would be great to have autocompletion for $job as well. However, padawan.php just marks it as a generic object.
This syntax has been implemented by many IDE's, for example NetBeans.
Implement inline
@varsyntax.Sometimes, you know for a fact that some function returns a certain type. However, type hinting won't work because the function is too generic for that. For example, with the ZF2 ServiceManager:
In this case, it would be great to have autocompletion for
$jobas well. However, padawan.php just marks it as a genericobject.This syntax has been implemented by many IDE's, for example NetBeans.