Created
February 16, 2012 13:52
-
-
Save gavinwilliams/1844953 to your computer and use it in GitHub Desktop.
Getting code complete on assignments in Zend Studio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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