Skip to content

Commit

Permalink
Fix checkstyles
Browse files Browse the repository at this point in the history
  • Loading branch information
modembcc committed Apr 15, 2024
1 parent 81be8b0 commit a06b946
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public AddCommentCommand parse(String args) throws ParseException {
}
String memberName = memberAndProject.split(" /to ")[0];
String projectName = memberAndProject.split(" /to ")[1];
if (memberName.length() == 0 || projectName.length() == 0 || !Name.isValidName(projectName) || !Name.isValidName(memberName)) {
if (memberName.length() == 0 || projectName.length() == 0
|| !Name.isValidName(projectName) || !Name.isValidName(memberName)) {
throw new ParseException("Names should be alphanumerical and not empty.");
}
Member member = new Member(memberName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public AddTaskCommand parse(String args) throws ParseException {
}
String taskName = args.split(" /to")[0];
String projectName = args.split("/to ")[1];
if(!Name.isValidName(projectName) || !Name.isValidName(taskName)) {
if (!Name.isValidName(projectName) || !Name.isValidName(taskName)) {
throw new ParseException("Names should be alphanumerical and not empty.");
}
ParserUtil.parseName(taskName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public DeleteTaskCommand parse(String args) throws ParseException {
}
String taskName = args.split(" /in")[0];
String projectName = args.split("/in ")[1];
if ((taskName.length() == 0) || (projectName.length() == 0 || (!Name.isValidName(projectName) || (!Name.isValidName(taskName))))) {
if ((taskName.length() == 0) || (projectName.length() == 0
|| (!Name.isValidName(projectName) || (!Name.isValidName(taskName))))) {
throw new ParseException("Names should be alphanumerical and not empty.");
}
Task task = new Task(taskName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ public SetStatusCommand parse(String args) throws ParseException {
private SetTaskStatusCommand parseSetTaskStatusCommand(String taskAndProject, String status) throws ParseException {
String taskName = taskAndProject.split("/in ")[0].trim();
String projectName = taskAndProject.split("/in ")[1];
if ((projectName.length() == 0) || (taskName.length() == 0) || (!Name.isValidName(projectName)) || (!Name.isValidName(taskName))) {
if ((projectName.length() == 0) || (taskName.length() == 0)
|| (!Name.isValidName(projectName)) || (!Name.isValidName(taskName))) {
throw new ParseException("Names should be alphanumerical and not empty.");
}
Project project = new Project(ParserUtil.parseName(projectName));
Expand Down

0 comments on commit a06b946

Please sign in to comment.