-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
} | ||
} | ||
|
||
fun updateScore(ctx: Context, deltaTotal: Int = 0, deltaBest: Int = 0, deltaCorrect: Int = 0, deltaRanking: Int = 0){ |
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.
Method updateScore
has 5 arguments (exceeds 4 allowed). Consider refactoring.
} | ||
|
||
|
||
fun updateUsername(ctx: Context, username: String){ |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
} | ||
} | ||
|
||
fun updateHandle(ctx: Context, handle: String){ |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
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.
Just couple of very small things but overall good work! LGTM
* @param newVal (Int) the new value of the field that is being updated | ||
* @param fieldName the field name of the field that is being updated | ||
*/ | ||
fun updateFieldInt(userID: String, newVal: Int, fieldName: String) { |
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.
Maybe we can pass newVal as a generic type and have one function? What do you think?
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.
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 think that might be a good idea for a future refactor. Like this is not important yet would be done to improve maintainability.
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 job! Everything looks good to me.
} | ||
} | ||
|
||
/** |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
} | ||
} | ||
|
||
/** |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
Code Climate has analyzed commit 29e5801 and detected 5 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 96.4% (80% is the threshold). This pull request will bring the total coverage in the repository to 88.4%. View more on Code Climate. |
UserSharedPref
This is related to issue #142
This Pull Requests contains:
In addition the code is tested with a coverage of: [96]%
Notes for reviewers