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

Improve type hint #272

Merged
merged 1 commit into from Sep 21, 2015
Merged

Conversation

JeroenDeDauw
Copy link
Contributor

No description provided.

@ravage84
Copy link
Member

ravage84 commented Mar 9, 2015

Not sure if this really makes sense.
One should program against an interface not against a concrete implementation.
Also you would need to change it here, too - probably:
https://github.com/JeroenDeDauw/phpmd/blob/AnalyzerNodeAware/src/main/php/PHPMD/Parser.php#L160

@JeroenDeDauw
Copy link
Contributor Author

One should program against an interface not against a concrete implementation.

Yes yes, I know :)

AnalyzerNodeAware is an interface though. And more importantly, the class relies on the fields to implement it, since it calls a method that it adds to Analyzer. Code that pretends to program against an interface but relies on an implementation or derivative is definitely not good IMO.

@JeroenDeDauw
Copy link
Contributor Author

poke

manuelpichler pushed a commit that referenced this pull request Sep 21, 2015
@manuelpichler manuelpichler merged commit 8227ae2 into phpmd:master Sep 21, 2015
@JeroenDeDauw JeroenDeDauw deleted the AnalyzerNodeAware branch September 21, 2015 20:13
@ravage84 ravage84 added this to the 2.3.0 milestone Jul 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants