diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index 044b2cfd7e33..e77379786cfd 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -193,8 +193,6 @@ class NinjaMailerJob implements ShouldQueue return $this->setMailDriver(); } - - /* * Now that our token is refreshed and valid we can boot the * mail driver at runtime and also set the token which will persist diff --git a/app/Listeners/Invoice/InvoiceEmailedNotification.php b/app/Listeners/Invoice/InvoiceEmailedNotification.php index f6a083b3ea37..59ac94e2c3ef 100644 --- a/app/Listeners/Invoice/InvoiceEmailedNotification.php +++ b/app/Listeners/Invoice/InvoiceEmailedNotification.php @@ -63,7 +63,7 @@ class InvoiceEmailedNotification implements ShouldQueue $methods = $this->findUserNotificationTypes($event->invitation, $company_user, 'invoice', ['all_notifications', 'invoice_sent', 'invoice_sent_all']); /* If one of the methods is email then we fire the EntitySentMailer */ - if (($key = array_search('mail', $methods))) { + if (($key = array_search('mail', $methods)) !== false) { unset($methods[$key]); $nmo->to_user = $user; diff --git a/app/Listeners/Invoice/InvoiceFailedEmailNotification.php b/app/Listeners/Invoice/InvoiceFailedEmailNotification.php index 3f6551de4159..ac89010cadeb 100644 --- a/app/Listeners/Invoice/InvoiceFailedEmailNotification.php +++ b/app/Listeners/Invoice/InvoiceFailedEmailNotification.php @@ -58,7 +58,7 @@ class InvoiceFailedEmailNotification $methods = $this->findUserNotificationTypes($event->invitation, $company_user, 'invoice', ['all_notifications', 'invoice_sent', 'invoice_sent_all']); - if (($key = array_search('mail', $methods))) { + if (($key = array_search('mail', $methods)) !== false) { unset($methods[$key]); $nmo->to_user = $user; diff --git a/app/Listeners/Quote/QuoteCreatedNotification.php b/app/Listeners/Quote/QuoteCreatedNotification.php index c258b0d33c51..699b6eba88c2 100644 --- a/app/Listeners/Quote/QuoteCreatedNotification.php +++ b/app/Listeners/Quote/QuoteCreatedNotification.php @@ -60,7 +60,7 @@ class QuoteCreatedNotification implements ShouldQueue $methods = $this->findUserNotificationTypes($quote->invitations()->first(), $company_user, 'quote', ['all_notifications', 'quote_created', 'quote_created_all']); /* If one of the methods is email then we fire the EntitySentMailer */ - if (($key = array_search('mail', $methods))) { + if (($key = array_search('mail', $methods)) !== false) { unset($methods[$key]); diff --git a/tests/Feature/CompanyTest.php b/tests/Feature/CompanyTest.php index 8ec6928f283c..538ef194ffce 100644 --- a/tests/Feature/CompanyTest.php +++ b/tests/Feature/CompanyTest.php @@ -100,7 +100,6 @@ class CompanyTest extends TestCase $settings->invoice_design_id = '2'; $settings->quote_design_id = '1'; -nlog($settings); $company->settings = $settings; $response = $this->withHeaders([