refactor: code style changes
Signed-off-by: miguel456 <me@nogueira.codes>
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
|
||||
use App\Application;
|
||||
use App\Exceptions\InvalidAppointmentException;
|
||||
|
||||
@@ -12,13 +10,14 @@ class MeetingNoteService
|
||||
/**
|
||||
* Adds meeting notes to an application.
|
||||
*
|
||||
* @param Application $application
|
||||
* @param Application $application
|
||||
* @param $noteText
|
||||
* @return bool
|
||||
*
|
||||
* @throws InvalidAppointmentException Thrown when an application doesn't have an appointment to save notes to
|
||||
*/
|
||||
public function addToApplication(Application $application, $noteText): bool {
|
||||
|
||||
public function addToApplication(Application $application, $noteText): bool
|
||||
{
|
||||
if (! is_null($application)) {
|
||||
$application->load('appointment');
|
||||
|
||||
@@ -26,11 +25,8 @@ class MeetingNoteService
|
||||
$application->appointment->save();
|
||||
|
||||
return true;
|
||||
|
||||
} else {
|
||||
throw new InvalidAppointmentException('There\'s no appointment to save notes to!');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user