Improve comments and remove unused imports

This commit is contained in:
Marcus Moore 2023-04-05 12:39:41 -07:00
parent 3cc3662992
commit 3054d633b0
No known key found for this signature in database

View file

@ -9,15 +9,12 @@ use App\Models\Consumable;
use App\Models\LicenseSeat;
use App\Models\Recipients\AdminRecipient;
use App\Models\Setting;
use App\Models\User;
use App\Notifications\CheckinAccessoryNotification;
use App\Notifications\CheckinAssetNotification;
use App\Notifications\CheckinLicenseNotification;
use App\Notifications\CheckinLicenseSeatNotification;
use App\Notifications\CheckoutAccessoryNotification;
use App\Notifications\CheckoutAssetNotification;
use App\Notifications\CheckoutConsumableNotification;
use App\Notifications\CheckoutLicenseNotification;
use App\Notifications\CheckoutLicenseSeatNotification;
use Illuminate\Support\Facades\Notification;
use Exception;
@ -26,16 +23,12 @@ use Log;
class CheckoutableListener
{
/**
* Notify the user about the checked out checkoutable and add a record to the
* Notify the user and post to webhook about the checked out checkoutable and add a record to the
* checkout_requests table.
*/
public function onCheckedOut($event)
{
// @todo: update docblock
// @todo: comment...we send this anonymously so that webhook notification still
// @todo: get sent for models that don't have email addresses associated...
// Send an anonymous webhook notification if setting enabled
if ($this->shouldSendWebhookNotification()) {
Notification::route('slack', Setting::getSettings()->webhook_endpoint)
->notify($this->getCheckoutNotification($event));
@ -65,16 +58,13 @@ class CheckoutableListener
}
/**
* Notify the user about the checked in checkoutable
* Notify the user and post to webhook about the checked in checkoutable
*/
public function onCheckedIn($event)
{
\Log::debug('onCheckedIn in the Checkoutable listener fired');
// @todo: update docblock
// @todo: comment...we send this anonymously so that webhook notification still
// @todo: get sent for models that don't have email addresses associated...
// Send an anonymous webhook notification if setting enabled
if ($this->shouldSendWebhookNotification()) {
Notification::route('slack', Setting::getSettings()->webhook_endpoint)
->notify($this->getCheckinNotification($event));