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

Feature/add use relationship #3

Draft
wants to merge 17 commits into
base: development
Choose a base branch
from
Draft

Feature/add use relationship #3

wants to merge 17 commits into from

Conversation

LeoVie
Copy link

@LeoVie LeoVie commented Jul 16, 2019

No description provided.

@rmllr
Copy link
Member

rmllr commented Jul 17, 2019

Thank you very much for the contribution. We will review it in August.

@b-pos465 b-pos465 self-requested a review September 6, 2019 12:57
Copy link
Member

@b-pos465 b-pos465 left a 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:

  1. Try using more private functions which have exactly one responsibility and name them accordingly.
  2. 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")
Copy link
Member

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;

/*
Copy link
Member

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 {

/**
Copy link
Member

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 {

/**
Copy link
Member

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);

/**
Copy link
Member

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);
Copy link
Member

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);
Copy link
Member

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(){
/**
Copy link
Member

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{

/**
Copy link
Member

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);

/**
Copy link
Member

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.

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.

3 participants