-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/add use relationship #3
base: development
Are you sure you want to change the base?
Feature/add use relationship #3
Conversation
…a-php-plugin to 0.0.9
Thank you very much for the contribution. We will review it in August. |
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.
First of all, thank you for your contribution! We really appreciate it :)
There are a few changes that are not written by you. Still, as I did not work on this plugin before, I commented everything I saw.
A few tips in general:
Only add documentation if it adds value to the code. There is no use in adding boilerplate which makes code harder to read. The concept 'Clean Code' states that code should be as self explanatory as possible. Of course, this is not always possible. In this case I can give you two hints:
- Try using more private functions which have exactly one responsibility and name them accordingly.
- Take a lot of time to think about the method naming. Naming is one of the hardest things in software development. I usually rename my code 2-3 times after the first approach.
Please feel free to ask question regarding any of my comments!
@Property("lineNumber") | ||
int getLineNumber(); | ||
void setLineNumber(int lineNumber); | ||
@Property("firstLineNumber") |
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.
Thank you for the improvement. That is way clearer than before :)
After improving the property name, the documentation does not add any value - it's redundant. Please remove it.
@@ -1,19 +1,13 @@ | |||
import java.io.File; | |||
import java.io.InputStream; | |||
|
|||
/* |
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 didn't work on this plugin before. Is there a good reason to keep this file? Otherwise feel free to remove it.
@@ -17,6 +17,10 @@ | |||
@Label(value = "Namespace", usingIndexedPropertyOf = FullQualifiedNameDescriptor.class) | |||
public interface PHPNamespaceDescriptor extends PHPDescriptor, FullQualifiedNameDescriptor { | |||
|
|||
/** |
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.
This is redundant as well.
@@ -15,6 +15,10 @@ | |||
@Label("Field") | |||
public interface PHPPropertyDescriptor extends PHPDescriptor { | |||
|
|||
/** |
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.
This is redundant as well.
@@ -34,6 +38,14 @@ | |||
Boolean isStatic(); | |||
void setStatic(Boolean s); | |||
|
|||
/** |
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.
This is redundant as well.
@@ -42,8 +42,8 @@ public PHPPropertyDescriptor parse(ParseTree tree){ | |||
*/ | |||
protected void parseTree(ParseTree tree, int level){ | |||
|
|||
//String pad = "PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP".substring(0, level); | |||
//System.err.println(pad + " [" + tree.getClass().getSimpleName() + "]: " + tree.getText()); //getCanonicalName | |||
// String pad = "PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP".substring(0, level); |
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.
Please remove this.
@@ -50,8 +49,8 @@ public PHPTypeDescriptor parse(ParseTree tree){ | |||
*/ | |||
protected void parseTree(ParseTree tree, int level, int idx){ | |||
|
|||
//String pad = "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC".substring(0, level); | |||
//System.err.println(pad + " [" + tree.getClass().getSimpleName() + "]: " + tree.getText()); //getCanonicalName | |||
// String pad = "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC".substring(0, level); |
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.
Please remove this.
@@ -16,7 +17,11 @@ | |||
public String name = ""; | |||
public String alias = ""; | |||
|
|||
public String getFullQualifiedName(){ | |||
/** |
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.
This documentation does not provide any value.
@@ -15,11 +15,18 @@ | |||
@Label("Parameter") | |||
public interface PHPFunctionParameterDescriptor extends PHPDescriptor{ | |||
|
|||
/** |
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.
This documentation does not provide value.
void setIndex(int index); | ||
|
||
/** |
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.
This documentation does not provide value.
No description provided.