• Wellington • Simon Erkelens • Simon • I work for SilverStripe • @Firesphere • https://github.com/firesphere • https://speakerdeck.com/firesphere • You know it’s me, when you see Hans ◦ Except maybe on Twitter This is Hans, my RDD tool. She’s a cow
march, 2016 • Wellington • Simon Erkelens • PHP Docblocks • Usage • Class information ◦ @author/@description/@property/@method/@package • Function descriptions ◦ @param/@return/@throws/@deprecated • Code Completion • Pat your IDE. He/she’s very happy you use docblocks
developer, right? 16 march, 2016 • Wellington • Simon Erkelens • Class docblock • @param • @returns • @throws • @deprecated • And again, description • If it’s hard to write, it should be hard to read ◦ right? • Sorry, can’t help you there
a developer, right? 16 march, 2016 • Wellington • Simon Erkelens • Let’s get started with the fun stuff! • IDEAnnotator https://github.com/axyr/silverstripe-ideannotator • StartGeneratedWithDataObjectAnnotator • @property • @mixin • @method • EndGeneratedWithDataObjectAnnotator
16 march, 2016 • Wellington • Simon Erkelens • Literally alters the content of your file • Despite testing, we can’t promise your file isn’t broken :’( • There’s no use for updating annotations on live • It’s for your IDE, not your visitor • It’s okay to commit them to your repository though • ?skipannotation=true
• Simon Erkelens • Save time • Instantly all options and methods available in your IDE • Let the annotator do the thinking • No more accidental @property where you mean @method • Even the ID properties for has_one relations are there • Help yourself, help others
help make it big 16 march, 2016 • Wellington • Simon Erkelens • It’s far from done • Multiple classes in one file • Page_Controller @mixins Page|datarecord • allowed_actions? https://github.com/axyr/silverstripe-ideannotator I was told to add a kitten to my presentation