From 7d1929ea8989b9f395b2241417a920487f2d9249 Mon Sep 17 00:00:00 2001 From: Darren Date: Sun, 15 Oct 2023 20:55:33 +0800 Subject: [PATCH] Fix styling --- src/main/java/seedu/address/logic/commands/PinCommand.java | 5 +++-- src/main/java/seedu/address/logic/commands/UnpinCommand.java | 5 +++-- src/main/java/seedu/address/storage/JsonAdaptedPerson.java | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/java/seedu/address/logic/commands/PinCommand.java b/src/main/java/seedu/address/logic/commands/PinCommand.java index 5634e02b2c3..cd3c3bb5d8c 100644 --- a/src/main/java/seedu/address/logic/commands/PinCommand.java +++ b/src/main/java/seedu/address/logic/commands/PinCommand.java @@ -41,8 +41,9 @@ public CommandResult execute(Model model) throws CommandException { } Person personToPin = lastShownList.get(targetIndex.getZeroBased()); - Person pinnedPerson = new Person(personToPin.getName(), personToPin.getEmail(), personToPin.getPhone(), personToPin.getGender(), - personToPin.getAge(), personToPin.getBloodType(), personToPin.getAllergies(), true); + Person pinnedPerson = new Person(personToPin.getName(), personToPin.getEmail(), personToPin.getPhone(), + personToPin.getGender(), personToPin.getAge(), personToPin.getBloodType(), personToPin.getAllergies(), + true); model.setPerson(personToPin, pinnedPerson); return new CommandResult(String.format(MESSAGE_PIN_PERSON_SUCCESS, Messages.format(personToPin))); diff --git a/src/main/java/seedu/address/logic/commands/UnpinCommand.java b/src/main/java/seedu/address/logic/commands/UnpinCommand.java index d78aea25e30..e4d90ac9df3 100644 --- a/src/main/java/seedu/address/logic/commands/UnpinCommand.java +++ b/src/main/java/seedu/address/logic/commands/UnpinCommand.java @@ -41,8 +41,9 @@ public CommandResult execute(Model model) throws CommandException { } Person personToUnpin = lastShownPinnedList.get(targetIndex.getZeroBased()); - Person unpinnedPerson = new Person(personToUnpin.getName(), personToUnpin.getEmail(), personToUnpin.getPhone(), personToUnpin.getGender(), - personToUnpin.getAge(), personToUnpin.getBloodType(), personToUnpin.getAllergies(), false); + Person unpinnedPerson = new Person(personToUnpin.getName(), personToUnpin.getEmail(), personToUnpin.getPhone(), + personToUnpin.getGender(), personToUnpin.getAge(), personToUnpin.getBloodType(), + personToUnpin.getAllergies(), false); model.setPerson(personToUnpin, unpinnedPerson); return new CommandResult(String.format(MESSAGE_UNPIN_PERSON_SUCCESS, Messages.format(personToUnpin))); diff --git a/src/main/java/seedu/address/storage/JsonAdaptedPerson.java b/src/main/java/seedu/address/storage/JsonAdaptedPerson.java index 5ee4d1f66ef..1def40fb6af 100644 --- a/src/main/java/seedu/address/storage/JsonAdaptedPerson.java +++ b/src/main/java/seedu/address/storage/JsonAdaptedPerson.java @@ -130,7 +130,8 @@ public Person toModelType() throws IllegalValueException { final BloodType modelBloodType = new BloodType(bloodType); final Set modelAllergies = new HashSet<>(allergiesList); - return new Person(modelName, modelEmail, modelPhone, modelGender, modelAge, modelBloodType, modelAllergies, false); + return new Person(modelName, modelEmail, modelPhone, modelGender, modelAge, modelBloodType, modelAllergies, + false); } }