PhpClass a bit refactoring on toStringType method