Fix phpdoc and function scope

In fact it's a discution with @Djeg. I'm okay with you but @Djeg says it's not really SOLID, so I've followed its opinion. 
What do you think ?