Skip to content

Commit

Permalink
Merge pull request #48 from emchooo/analysis-J2xb2a
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
emchooo authored Aug 7, 2020
2 parents aa1469f + 536bd88 commit 12a7e8b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 12 deletions.
6 changes: 3 additions & 3 deletions app/Console/Commands/MailnessInstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public function handle()

$this->createEnvFile();

if (strlen(config('app.key')) === 0) :
if (strlen(config('app.key')) === 0) {
$this->call('key:generate');
$this->line('Secret key properly generated');
endif;
$this->line('Secret key properly generated');
}

$credentials = $this->requestDatabaseCredentials();

Expand Down
3 changes: 0 additions & 3 deletions app/Jobs/SendCampaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
use App\Models\Lists;
use App\Models\SendingLog;
use App\Models\Service;
use DOMDocument;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Str;

class SendCampaign implements ShouldQueue
{
Expand Down Expand Up @@ -52,5 +50,4 @@ public function handle()

SetCampaignAsSent::dispatch($this->campaign);
}

}
1 change: 0 additions & 1 deletion app/Jobs/SendEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use App\Jobs\Middleware\RateLimited;
use App\Mail\CampaignMail;
use App\Models\SendingLog;
use DOMDocument;
use Exception;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
Expand Down
7 changes: 3 additions & 4 deletions app/Mail/CampaignMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace App\Mail;

use App\Models\SendingLog;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use App\Models\SendingLog;

class CampaignMail extends Mailable
{
Expand Down Expand Up @@ -36,12 +36,11 @@ public function __construct(SendingLog $send, $config)
*/
public function build()
{

return $this->html($this->getMailContent());
}

protected function getMailContent() {
protected function getMailContent()
{
return $this->send->campaign->html_formated;
}

}
2 changes: 1 addition & 1 deletion app/Rules/EmailUniqueForEachListRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function passes($attribute, $value)

return null === Contact::query()
->where('email', $value)
->when($this->list, function (Builder $query) use ($contact) {
->when($this->list, function (Builder $query) {
return $query->where('list_id', '=', $this->list->id);
})
->when($contact, function (Builder $query) use ($contact) {
Expand Down

0 comments on commit 12a7e8b

Please sign in to comment.