Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit namespace for non-namespace Factory #132

Merged
merged 1 commit into from Aug 4, 2021
Merged

Omit namespace for non-namespace Factory #132

merged 1 commit into from Aug 4, 2021

Conversation

jbrada
Copy link

@jbrada jbrada commented Aug 4, 2021

If we use Factory in the code for a class that does not have a namespace, phpstan will return an error.

For example: use Zend_Db_Adapter_SqlsrvFactory

In this case, the generated file has an empty namespace.

This pull request adds a condition that makes this case remain without a namespace.

Before:
image

After:
image

@shochdoerfer
Copy link
Member

Awesome! Thanks @jbrada for your first contribution. Will have a look soon and hopefully merge it quickly :)

@shochdoerfer shochdoerfer added this to the 0.9.0 milestone Aug 4, 2021
@shochdoerfer
Copy link
Member

Looks good to me. Straight forward change.

@shochdoerfer shochdoerfer merged commit 17a2473 into bitExpert:master Aug 4, 2021
@shochdoerfer
Copy link
Member

I can probably build the next release in a few days.

@jbrada
Copy link
Author

jbrada commented Aug 4, 2021

Great :-), Keep up the good work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants