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

Features adding suggestion #66

Open
sidux opened this issue Nov 20, 2019 · 1 comment
Open

Features adding suggestion #66

sidux opened this issue Nov 20, 2019 · 1 comment

Comments

@sidux
Copy link
Contributor

sidux commented Nov 20, 2019

Hi,

I have some ideas if you approve of i will create a PR for it :

  • handle types by adding a PhpType interface that will be implemented by PhpClass and PhpInterface classes to be able to automatically add use statements
  • PhpMethod and PhpParameter type will be list of types merged from typehint and docblock (if we set multiple types we will use only doc block)
  • PhpClass getInterfaces return collection of PhpInterface objects
  • Auto add use statement when adding an interface to PhpClass

What do you think of this ?

Cheers,

@sidux sidux closed this as completed Dec 7, 2019
@gossi
Copy link
Member

gossi commented Dec 8, 2019

Sorry for not responding earlier, next week will even be better:

handle types by adding a PhpType interface that will be implemented by PhpClass and PhpInterface classes to be able to automatically add use statements

I see what you are after. I like it, just do not like the name PhpType - something better and we can have it as an interface for interfaces and classes.

PhpMethod and PhpParameter type will be list of types merged from typehint and docblock (if we set multiple types we will use only doc block)

I unfortunately don't get that one - can you explain in more detail please? :)

PhpClass getInterfaces return collection of PhpInterface objects

They actually do. It's a Set from phootwork/collection.

Auto add use statement when adding an interface to PhpClass

Yup, pass in a PhpInterface and a use statement will be added :)

Thanks for your ideas. Let's clarify them and then see how we can implement them :)

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