Skip to content

Instantly share code, notes, and snippets.

@gavinwilliams
Created February 16, 2012 13:52
Show Gist options
  • Save gavinwilliams/1844953 to your computer and use it in GitHub Desktop.
Save gavinwilliams/1844953 to your computer and use it in GitHub Desktop.
Getting code complete on assignments in Zend Studio
/**
* By checking to see whether an assignment is an instance of an object, Zend Studio will pick up on this hint
* and produce code complete for your newly assigned variable.
*/
if(($entity instanceof \My\Special\Object\Entity\EntityName) === false){
throw new Exception('WAAAAH! Something went wrong!');
} else {
$entity->getAwesomeness();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment