Added sniff that detects if an entity implements the automatically generated interface

Also made the project compatible with PHP 5.4 again
you can just break here with a guard clause. Else is no longer needed