Skip to content

A free open source IT asset/license management system

Apply pint to Mail directory

snipede607e7d8370
diff --git a/app/Mail/BaseMailable.php b/app/Mail/BaseMailable.php
index 470be9d957..dbe4fd2f8c 100644
--- a/app/Mail/BaseMailable.php
+++ b/app/Mail/BaseMailable.php
@@ -1,4 +1,5 @@
<?php
+
namespace App\Mail;
use Illuminate\Mail\Mailable;
@@ -15,4 +16,4 @@ class BaseMailable extends Mailable
]
);
}
-}
\ No newline at end of file
+}
diff --git a/app/Mail/BulkAssetCheckoutMail.php b/app/Mail/BulkAssetCheckoutMail.php
index 9a4ccee85c..42b92d8c4e 100644
--- a/app/Mail/BulkAssetCheckoutMail.php
+++ b/app/Mail/BulkAssetCheckoutMail.php
@@ -77,7 +77,7 @@ class BulkAssetCheckoutMail extends Mailable
{
$this->assets = $this->assets->map(function (Asset $asset) {
$fields = $asset->model?->fieldset?->fields->filter(function (CustomField $field) {
- return $field->show_in_email && !$field->field_encrypted;
+ return $field->show_in_email && ! $field->field_encrypted;
});
$asset->setRelation('fields', $fields);
@@ -97,7 +97,7 @@ class BulkAssetCheckoutMail extends Mailable
private function groupAssetsByCategory(): Collection
{
- return $this->assets->groupBy(fn($asset) => $asset->model->category->id);
+ return $this->assets->groupBy(fn ($asset) => $asset->model->category->id);
}
private function getIntroduction(): string
@@ -111,7 +111,7 @@ class BulkAssetCheckoutMail extends Mailable
private function getRequiresAcceptanceInfo(): ?string
{
- if (!$this->requires_acceptance) {
+ if (! $this->requires_acceptance) {
return null;
}
@@ -120,7 +120,7 @@ class BulkAssetCheckoutMail extends Mailable
private function getRequiresAcceptancePrompt(): ?string
{
- if (!$this->requires_acceptance) {
+ if (! $this->requires_acceptance) {
return null;
}
diff --git a/app/Mail/CheckinAccessoryMail.php b/app/Mail/CheckinAccessoryMail.php
index fac194e588..f81d659e4d 100644
--- a/app/Mail/CheckinAccessoryMail.php
+++ b/app/Mail/CheckinAccessoryMail.php
@@ -7,6 +7,7 @@ use App\Models\Setting;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailables\Address;
+use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
@@ -47,11 +48,11 @@ class CheckinAccessoryMail extends BaseMailable
{
return new Content(
markdown: 'mail.markdown.checkin-accessory',
- with: [
- 'item' => $this->item,
- 'admin' => $this->admin,
- 'note' => $this->note,
- 'target' => $this->target,
+ with: [
+ 'item' => $this->item,
+ 'admin' => $this->admin,
+ 'note' => $this->note,
+ 'target' => $this->target,
]
);
}
@@ -59,7 +60,7 @@ class CheckinAccessoryMail extends BaseMailable
/**
* Get the attachments for the message.
*
- * @return array<int, \Illuminate\Mail\Mailables\Attachment>
+ * @return array<int, Attachment>
*/
public function attachments(): array
{
diff --git a/app/Mail/CheckinAssetMail.php b/app/Mail/CheckinAssetMail.php
index b4caefeb82..d1e16da8c1 100644
--- a/app/Mail/CheckinAssetMail.php
+++ b/app/Mail/CheckinAssetMail.php
@@ -8,9 +8,9 @@ use App\Models\Setting;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailables\Address;
+use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
-use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Queue\SerializesModels;
class CheckinAssetMail extends BaseMailable
@@ -53,7 +53,6 @@ class CheckinAssetMail extends BaseMailable
* Get the mail representation of the notification.
*
* @param mixed $notifiable
- * @return Content
*/
public function content(): Content
{
@@ -67,14 +66,14 @@ class CheckinAssetMail extends BaseMailable
return new Content(
markdown: 'mail.markdown.checkin-asset',
- with: [
- 'item' => $this->item,
- 'status' => $this->item->assetstatus?->name,
- 'admin' => $this->admin,
- 'note' => $this->note,
- 'target' => $this->target,
- 'fields' => $fields,
- 'expected_checkin' => $this->expected_checkin,
+ with: [
+ 'item' => $this->item,
+ 'status' => $this->item->assetstatus?->name,
+ 'admin' => $this->admin,
+ 'note' => $this->note,
+ 'target' => $this->target,
+ 'fields' => $fields,
+ 'expected_checkin' => $this->expected_checkin,
],
);
}
@@ -82,7 +81,7 @@ class CheckinAssetMail extends BaseMailable
/**
* Get the attachments for the message.
*
- * @return array<int, \Illuminate\Mail\Mailables\Attachment>
+ * @return array<int, Attachment>
*/
public function attachments(): array
{
diff --git a/app/Mail/CheckinComponentMail.php b/app/Mail/CheckinComponentMail.php
index 77af16ae28..d7cb595dac 100644
--- a/app/Mail/CheckinComponentMail.php
+++ b/app/Mail/CheckinComponentMail.php
@@ -2,12 +2,12 @@
namespace App\Mail;
-use App\Models\Accessory;
use App\Models\Component;
use App\Models\Setting;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailables\Address;
+use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
@@ -48,11 +48,11 @@ class CheckinComponentMail extends BaseMailable
{
return new Content(
markdown: 'mail.markdown.checkin-component',
- with: [
- 'item' => $this->item,
- 'admin' => $this->admin,
- 'note' => $this->note,
- 'target' => $this->target,
+ with: [
+ 'item' => $this->item,
+ 'admin' => $this->admin,
+ 'note' => $this->note,
+ 'target' => $this->target,
]
);
}
@@ -60,7 +60,7 @@ class CheckinComponentMail extends BaseMailable
/**
* Get the attachments for the message.
*
- * @return array<int, \Illuminate\Mail\Mailables\Attachment>
+ * @return array<int, Attachment>
*/
public function attachments(): array
{
diff --git a/app/Mail/CheckinLicenseMail.php b/app/Mail/CheckinLicenseMail.php
index 7fe7cd7916..52b14bc9b3 100644
--- a/app/Mail/CheckinLicenseMail.php
+++ b/app/Mail/CheckinLicenseMail.php
@@ -7,6 +7,7 @@ use App\Models\Setting;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailables\Address;
+use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
@@ -47,12 +48,12 @@ class CheckinLicenseMail extends BaseMailable
{
return new Content(
markdown: 'mail.markdown.checkin-license',
- with: [
- 'license_seat' => $this->item,
- 'license' => $this->item->license,
- 'admin' => $this->admin,
- 'note' => $this->note,
- 'target' => $this->target,
+ with: [
+ 'license_seat' => $this->item,
+ 'license' => $this->item->license,
+ 'admin' => $this->admin,
+ 'note' => $this->note,
+ 'target' => $this->target,
]
);
}
@@ -60,7 +61,7 @@ class CheckinLicenseMail extends BaseMailable
/**
* Get the attachments for the message.
*
- * @return array<int, \Illuminate\Mail\Mailables\Attachment>
+ * @return array<int, Attachment>
*/
public function attachments(): array
{
diff --git a/app/Mail/CheckoutAcceptanceResponseMail.php b/app/Mail/CheckoutAcceptanceResponseMail.php
index 512bf18fc7..a285ebad67 100644
--- a/app/Mail/CheckoutAcceptanceResponseMail.php
+++ b/app/Mail/CheckoutAcceptanceResponseMail.php
@@ -5,6 +5,7 @@ namespace App\Mail;
use App\Models\CheckoutAcceptance;
use App\Models\User;
use Illuminate\Bus\Queueable;
+use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
@@ -14,7 +15,9 @@ class CheckoutAcceptanceResponseMail extends BaseMailable
use Queueable, SerializesModels;
public CheckoutAcceptance $acceptance;
+
public User $recipient;
+
public bool $wasAccepted;
/**
@@ -61,7 +64,7 @@ class CheckoutAcceptanceResponseMail extends BaseMailable
/**
* Get the attachments for the message.
*
- * @return array<int, \Illuminate\Mail\Mailables\Attachment>
+ * @return array<int, Attachment>
*/
public function attachments(): array
{
diff --git a/app/Mail/CheckoutAccessoryMail.php b/app/Mail/CheckoutAccessoryMail.php
index f92843151d..c323017386 100644
--- a/app/Mail/CheckoutAccessoryMail.php
+++ b/app/Mail/CheckoutAccessoryMail.php
@@ -9,6 +9,7 @@ use App\Models\Setting;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailables\Address;
+use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
@@ -59,27 +60,25 @@ class CheckoutAccessoryMail extends BaseMailable
$accept_url = is_null($this->acceptance) ? null : route('account.accept.item', $this->acceptance);
$name = null;
- if($this->target instanceof User){
+ if ($this->target instanceof User) {
$name = $this->target->display_name;
- }
- else if($this->target instanceof Asset){
- $name = $this->target->assignedto?->display_name;
- }
- else if($this->target instanceof Location){
- $name = $this->target->manager->name;
+ } elseif ($this->target instanceof Asset) {
+ $name = $this->target->assignedto?->display_name;
+ } elseif ($this->target instanceof Location) {
+ $name = $this->target->manager->name;
}
return new Content(
markdown: 'mail.markdown.checkout-accessory',
- with: [
- 'item' => $this->item,
- 'admin' => $this->admin,
- 'note' => $this->note,
- 'target' => $name,
- 'eula' => $eula,
- 'req_accept' => $req_accept,
- 'accept_url' => $accept_url,
- 'checkout_qty' => $this->checkout_qty,
+ with: [
+ 'item' => $this->item,
+ 'admin' => $this->admin,
+ 'note' => $this->note,
+ 'target' => $name,
+ 'eula' => $eula,
+ 'req_accept' => $req_accept,
+ 'accept_url' => $accept_url,
+ 'checkout_qty' => $this->checkout_qty,
'introduction_line' => $this->introductionLine(),
],
);
@@ -95,17 +94,18 @@ class CheckoutAccessoryMail extends BaseMailable
return trans_choice('mail.new_item_checked_with_acceptance', $this->checkout_qty);
}
- if ($this->firstTimeSending && !$this->requiresAcceptance()) {
+ if ($this->firstTimeSending && ! $this->requiresAcceptance()) {
return trans_choice('mail.new_item_checked', $this->checkout_qty);
}
- if (!$this->firstTimeSending && $this->requiresAcceptance()) {
+ if (! $this->firstTimeSending && $this->requiresAcceptance()) {
return trans('mail.recent_item_checked');
}
// we shouldn't get here but let's send a default message just in case
return trans('new_item_checked');
}
+
private function requiresAcceptance(): int|bool
{
return method_exists($this->item, 'requireAcceptance') ? $this->item->requireAcceptance() : 0;
@@ -114,7 +114,7 @@ class CheckoutAccessoryMail extends BaseMailable
/**
* Get the attachments for the message.
*
- * @return array<int, \Illuminate\Mail\Mailables\Attachment>
+ * @return array<int, Attachment>
*/
public function attachments(): array
{
diff --git a/app/Mail/CheckoutAssetMail.php b/app/Mail/CheckoutAssetMail.php
index 47410f0585..a9a883b1e3 100644
--- a/app/Mail/CheckoutAssetMail.php
+++ b/app/Mail/CheckoutAssetMail.php
@@ -22,6 +22,7 @@ class CheckoutAssetMail extends BaseMailable
/**
* Create a new message instance.
+ *
* @throws \Exception
*/
public function __construct(Asset $asset, $checkedOutTo, ?User $checkedOutBy, $acceptance, $note, bool $firstTimeSending = true)
@@ -67,7 +68,6 @@ class CheckoutAssetMail extends BaseMailable
* Get the mail representation of the notification.
*
* @param mixed $notifiable
- * @return Content
*/
public function content(): Content
{
@@ -77,14 +77,12 @@ class CheckoutAssetMail extends BaseMailable
$fields = [];
$name = null;
- if($this->target instanceof User){
+ if ($this->target instanceof User) {
$name = $this->target->display_name;
- }
- else if($this->target instanceof Asset){
- $name = $this->target->assignedto?->display_name;
- }
- else if($this->target instanceof Location){
- $name = $this->target->manager?->name;
+ } elseif ($this->target instanceof Asset) {
+ $name = $this->target->assignedto?->display_name;
+ } elseif ($this->target instanceof Location) {
+ $name = $this->target->manager?->name;
}
// Check if the item has custom fields associated with it
@@ -96,18 +94,18 @@ class CheckoutAssetMail extends BaseMailable
return new Content(
markdown: 'mail.markdown.checkout-asset',
- with: [
- 'item' => $this->item,
- 'admin' => $this->admin,
- 'status' => $this->item->assetstatus?->name,
- 'note' => $this->note,
- 'target' => $name,
- 'fields' => $fields,
- 'eula' => $eula,
- 'req_accept' => $req_accept,
- 'accept_url' => $accept_url,
+ with: [
+ 'item' => $this->item,
+ 'admin' => $this->admin,
+ 'status' => $this->item->assetstatus?->name,
+ 'note' => $this->note,
+ 'target' => $name,
+ 'fields' => $fields,
+ 'eula' => $eula,
+ 'req_accept' => $req_accept,
+ 'accept_url' => $accept_url,
'last_checkout' => $this->last_checkout,
- 'expected_checkin' => $this->expected_checkin,
+ 'expected_checkin' => $this->expected_checkin,
'introduction_line' => $this->introductionLine(),
],
);
@@ -142,11 +140,11 @@ class CheckoutAssetMail extends BaseMailable
return trans_choice('mail.new_item_checked_with_acceptance', 1);
}
- if ($this->firstTimeSending && !$this->requiresAcceptance()) {
+ if ($this->firstTimeSending && ! $this->requiresAcceptance()) {
return trans_choice('mail.new_item_checked', 1);
}
- if (!$this->firstTimeSending && $this->requiresAcceptance()) {
+ if (! $this->firstTimeSending && $this->requiresAcceptance()) {
return trans('mail.recent_item_checked');
}
diff --git a/app/Mail/CheckoutComponentMail.php b/app/Mail/CheckoutComponentMail.php
index f68b9f1431..920192fe3c 100644
--- a/app/Mail/CheckoutComponentMail.php
+++ b/app/Mail/CheckoutComponentMail.php
@@ -7,6 +7,7 @@ use App\Models\Setting;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailables\Address;
+use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
@@ -56,15 +57,15 @@ class CheckoutComponentMail extends BaseMailable
return new Content(
markdown: 'mail.markdown.checkout-component',
- with: [
- 'item' => $this->item,
- 'admin' => $this->admin,
- 'note' => $this->note,
- 'target' => $this->target,
- 'eula' => $eula,
- 'req_accept' => $req_accept,
- 'accept_url' => $accept_url,
- 'qty' => $this->qty,
+ with: [
+ 'item' => $this->item,
+ 'admin' => $this->admin,
+ 'note' => $this->note,
+ 'target' => $this->target,
+ 'eula' => $eula,
+ 'req_accept' => $req_accept,
+ 'accept_url' => $accept_url,
+ 'qty' => $this->qty,
]
);
}
@@ -72,7 +73,7 @@ class CheckoutComponentMail extends BaseMailable
/**
* Get the attachments for the message.
*
- * @return array<int, \Illuminate\Mail\Mailables\Attachment>
+ * @return array<int, Attachment>
*/
public function attachments(): array
{
diff --git a/app/Mail/CheckoutConsumableMail.php b/app/Mail/CheckoutConsumableMail.php
index c679de4a70..05aaeca2c6 100644
--- a/app/Mail/CheckoutConsumableMail.php
+++ b/app/Mail/CheckoutConsumableMail.php
@@ -7,6 +7,7 @@ use App\Models\Setting;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailables\Address;
+use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
@@ -59,15 +60,15 @@ class CheckoutConsumableMail extends BaseMailable
return new Content(
markdown: 'mail.markdown.checkout-consumable',
- with: [
- 'item' => $this->item,
- 'admin' => $this->admin,
- 'note' => $this->note,
- 'target' => $this->target,
- 'eula' => $eula,
- 'req_accept' => $req_accept,
- 'accept_url' => $accept_url,
- 'qty' => $this->qty,
+ with: [
+ 'item' => $this->item,
+ 'admin' => $this->admin,
+ 'note' => $this->note,
+ 'target' => $this->target,
+ 'eula' => $eula,
+ 'req_accept' => $req_accept,
+ 'accept_url' => $accept_url,
+ 'qty' => $this->qty,
'introduction_line' => $this->introductionLine(),
]
);
@@ -76,7 +77,7 @@ class CheckoutConsumableMail extends BaseMailable
/**
* Get the attachments for the message.
*
- * @return array<int, \Illuminate\Mail\Mailables\Attachment>
+ * @return array<int, Attachment>
*/
public function attachments(): array
{
@@ -98,11 +99,11 @@ class CheckoutConsumableMail extends BaseMailable
return trans_choice('mail.new_item_checked_with_acceptance', $this->qty);
}
- if ($this->firstTimeSending && !$this->requiresAcceptance()) {
+ if ($this->firstTimeSending && ! $this->requiresAcceptance()) {
return trans_choice('mail.new_item_checked', $this->qty);
}
- if (!$this->firstTimeSending && $this->requiresAcceptance()) {
+ if (! $this->firstTimeSending && $this->requiresAcceptance()) {
return trans('mail.recent_item_checked');
}
diff --git a/app/Mail/CheckoutLicenseMail.php b/app/Mail/CheckoutLicenseMail.php
index 9d9e0fc6e1..415145f43e 100644
--- a/app/Mail/CheckoutLicenseMail.php
+++ b/app/Mail/CheckoutLicenseMail.php
@@ -8,6 +8,7 @@ use App\Models\Setting;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailables\Address;
+use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
@@ -31,10 +32,9 @@ class CheckoutLicenseMail extends BaseMailable
$this->target = $checkedOutTo;
$this->firstTimeSending = $firstTimeSending;
- if($this->target instanceof User){
+ if ($this->target instanceof User) {
$this->target = $this->target->display_name;
- }
- elseif($this->target instanceof Asset){
+ } elseif ($this->target instanceof Asset) {
$this->target = $this->target->display_name;
}
}
@@ -61,17 +61,18 @@ class CheckoutLicenseMail extends BaseMailable
$req_accept = method_exists($this->item, 'requireAcceptance') ? $this->item->requireAcceptance() : 0;
$accept_url = is_null($this->acceptance) ? null : route('account.accept.item', $this->acceptance);
+
return new Content(
markdown: 'mail.markdown.checkout-license',
- with: [
- 'license_seat' => $this->item,
- 'license' => $this->item->license,
- 'admin' => $this->admin,
- 'note' => $this->note,
- 'target' => $this->target,
- 'eula' => $eula,
- 'req_accept' => $req_accept,
- 'accept_url' => $accept_url,
+ with: [
+ 'license_seat' => $this->item,
+ 'license' => $this->item->license,
+ 'admin' => $this->admin,
+ 'note' => $this->note,
+ 'target' => $this->target,
+ 'eula' => $eula,
+ 'req_accept' => $req_accept,
+ 'accept_url' => $accept_url,
'introduction_line' => $this->introductionLine(),
]
);
@@ -80,7 +81,7 @@ class CheckoutLicenseMail extends BaseMailable
/**
* Get the attachments for the message.
*
- * @return array<int, \Illuminate\Mail\Mailables\Attachment>
+ * @return array<int, Attachment>
*/
public function attachments(): array
{
@@ -102,11 +103,11 @@ class CheckoutLicenseMail extends BaseMailable
return trans_choice('mail.new_item_checked_with_acceptance', 1);
}
- if ($this->firstTimeSending && !$this->requiresAcceptance()) {
+ if ($this->firstTimeSending && ! $this->requiresAcceptance()) {
return trans_choice('mail.new_item_checked', 1);
}
- if (!$this->firstTimeSending && $this->requiresAcceptance()) {
+ if (! $this->firstTimeSending && $this->requiresAcceptance()) {
return trans('mail.recent_item_checked');
}
diff --git a/app/Mail/ExpiringAssetsMail.php b/app/Mail/ExpiringAssetsMail.php
index de193f27b5..236598c978 100644
--- a/app/Mail/ExpiringAssetsMail.php
+++ b/app/Mail/ExpiringAssetsMail.php
@@ -4,6 +4,7 @@ namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailables\Address;
+use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
@@ -42,8 +43,8 @@ class ExpiringAssetsMail extends BaseMailable
return new Content(
markdown: 'notifications.markdown.report-expiring-assets',
with: [
- 'assets' => $this->assets,
- 'threshold' => $this->threshold,
+ 'assets' => $this->assets,
+ 'threshold' => $this->threshold,
]
);
}
@@ -51,7 +52,7 @@ class ExpiringAssetsMail extends BaseMailable
/**
* Get the attachments for the message.
*
- * @return array<int, \Illuminate\Mail\Mailables\Attachment>
+ * @return array<int, Attachment>
*/
public function attachments(): array
{
diff --git a/app/Mail/ExpiringLicenseMail.php b/app/Mail/ExpiringLicenseMail.php
index 73bfd1cea4..71771f0300 100644
--- a/app/Mail/ExpiringLicenseMail.php
+++ b/app/Mail/ExpiringLicenseMail.php
@@ -4,6 +4,7 @@ namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailables\Address;
+use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
@@ -42,8 +43,8 @@ class ExpiringLicenseMail extends BaseMailable
return new Content(
markdown: 'notifications.markdown.report-expiring-licenses',
with: [
- 'licenses' => $this->licenses,
- 'threshold' => $this->threshold,
+ 'licenses' => $this->licenses,
+ 'threshold' => $this->threshold,
]
);
}
@@ -51,7 +52,7 @@ class ExpiringLicenseMail extends BaseMailable
/**
* Get the attachments for the message.
*
- * @return array<int, \Illuminate\Mail\Mailables\Attachment>
+ * @return array<int, Attachment>
*/
public function attachments(): array
{
diff --git a/app/Mail/SendUpcomingAuditMail.php b/app/Mail/SendUpcomingAuditMail.php
index 4a6c63e8e7..00a319a2c2 100644
--- a/app/Mail/SendUpcomingAuditMail.php
+++ b/app/Mail/SendUpcomingAuditMail.php
@@ -4,6 +4,7 @@ namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailables\Address;
+use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
@@ -41,14 +42,13 @@ class SendUpcomingAuditMail extends BaseMailable
public function content(): Content
{
-
return new Content(
markdown: 'notifications.markdown.upcoming-audits',
- with: [
- 'assets' => $this->assets,
- 'threshold' => $this->threshold,
- 'total' => $this->total,
+ with: [
+ 'assets' => $this->assets,
+ 'threshold' => $this->threshold,
+ 'total' => $this->total,
],
);
}
@@ -56,7 +56,7 @@ class SendUpcomingAuditMail extends BaseMailable
/**
* Get the attachments for the message.
*
- * @return array<int, \Illuminate\Mail\Mailables\Attachment>
+ * @return array<int, Attachment>
*/
public function attachments(): array
{
diff --git a/app/Mail/UnacceptedAssetReminderMail.php b/app/Mail/UnacceptedAssetReminderMail.php
index 09fb5bf8f9..5d29f1652c 100644
--- a/app/Mail/UnacceptedAssetReminderMail.php
+++ b/app/Mail/UnacceptedAssetReminderMail.php
@@ -4,6 +4,7 @@ namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailables\Address;
+use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
@@ -46,10 +47,10 @@ class UnacceptedAssetReminderMail extends BaseMailable
return new Content(
markdown: 'notifications.markdown.asset-reminder',
with: [
- 'count' => $this->count,
- 'assigned_to' => $this->target?->present()->fullName,
- 'link' => route('account.accept'),
- 'accept_url' => $accept_url,
+ 'count' => $this->count,
+ 'assigned_to' => $this->target?->present()->fullName,
+ 'link' => route('account.accept'),
+ 'accept_url' => $accept_url,
]
);
}
@@ -57,7 +58,7 @@ class UnacceptedAssetReminderMail extends BaseMailable
/**
* Get the attachments for the message.
*
- * @return array<int, \Illuminate\Mail\Mailables\Attachment>
+ * @return array<int, Attachment>
*/
public function attachments(): array
{