Ignore phpstorm files
Added a missing throws annotation
The getId function may return null
Corrected the detect function's return type
Merge pull request #244 from GrahamCampbell/fixes

A Few Fixes