Fixes in gen-stubs.php

I've made some fixes around interfaces and fixed class modifiers in gen-stubs