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

Allow resolving parameter types from new expressions. foo(new Bar()) #69

Merged
merged 1 commit into from
Jun 22, 2017

Conversation

CarsonF
Copy link
Contributor

@CarsonF CarsonF commented Jun 20, 2017

A real world example of this is with Flysystem. You pass in a handler object to Filesystem::get() which is then populated and returned.

$file = $filesystem->get('foo.txt', new File());

On a side note, I'm pretty confused on what's allowed in PhpTypeProvider3#getType.

Can you use an method of the (sub)element given or are you restricted to only certain ones?

Like PhpReference has getFQN, resolveLocalType, resolveLocalType, resolveGlobal, getType. Are all of these ok to use? or only some? Do none of these need the PhpIndex?

@Haehnchen Haehnchen merged commit 8e03bcb into Haehnchen:master Jun 22, 2017
@Haehnchen
Copy link
Owner

merged 👍

i never tried resolveLocal... they are new since versions, by naming they are valid in this scope to me. i am just using: getFQN, getType, getClassReferences, getTypes.

https://github.com/Haehnchen/idea-php-phpunit-plugin/tree/master/src/de/espend/idea/php/phpunit/type will also help you to investigate allowed methods.

@CarsonF CarsonF deleted the feature/new-expression branch June 22, 2017 17:26
cedricziel pushed a commit to cedricziel/idea-php-toolbox that referenced this pull request Jun 14, 2018
Added alias for VichUploadableBundle
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.

2 participants