TypehintableBehavior icon indicating copy to clipboard operation
TypehintableBehavior copied to clipboard

Possible conflicts between class names

Open stof opened this issue 13 years ago • 0 comments

you are adding use statements, but without checking if they could conflict with other classes in the same namespace (possible only if the user try to typehint a class ...\Base* as all om classes start with this prefix though) or with other use statement (more likely).

I see 2 possible ways to fix it:

  • don't generate a use statement, using the FQCN in the method signature => no conflict ever, but ugly generated code
  • alias the use statement to ensure the uniqueness => conflict possible if the logic choosing the alias is bad, ugliness possible depending of the generated alias

stof avatar Jul 15 '12 15:07 stof