Intellisense / Goto Definition for returned objects

Hi,

I am going to try and explain this and hope I don't confuse everyone.

if you call a function that instantiates some objects and then returns those objects you do not have intellisense or goto definition ability for the returned items.

Here is an example.

function & getData($userId, $locationID) {
  $user = new User();
  $user.load($userId);

  $location = new Location();
  $location.load($locationID);

  return array($user, $location);
}

list($user, $location) = getData($userID, $locationID);

// $user and $location do not have intellisense or Goto Definition support for
// their classes, methods or attributes.
// Even though the classes that define those objects are included in the
// references list

I hope this makes sense. :)

Comments

    Sorry for the mess

    It seems my code ran together into one big sloppy mess. I hope you can still read it.

    Sorry.