-
-
Notifications
You must be signed in to change notification settings - Fork 48
Parsing aliases in docblocks also #331
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
Conversation
6b56599 to
80cd452
Compare
8308c7e to
a0c0d41
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not expert about this part of the code, i left a couple of minor fixes, but apart from that for me it's ok 👍
|
|
||
| $violations = new Violations(); | ||
|
|
||
| $notHaveDependencyOutsideNamespace = new DependsOnlyOnTheseNamespaces('MyProject\AppBundle\Application'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable name is slightly wrong, but maybe we can test it more directly without using a rule?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FIxed!
src/Analyzer/NameResolver.php
Outdated
| } | ||
|
|
||
| if (null === $node->type) { | ||
| if (null === $node->type || !($node->type instanceof FullyQualified)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove the null === $node->type because is already in the second clause of the OR....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Fixed!
a0c0d41 to
d787ea6
Compare
This PR should solve problem 1 of this issue #307 about aliases