@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * |
13 | 13 | * @var array |
14 | 14 | */ |
15 | - public $relations = []; |
|
15 | + public $relations = [ ]; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * @param $filter |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | public function filter($filter) |
22 | 22 | { |
23 | - return $this->where(function ($q) use ($filter) { |
|
23 | + return $this->where(function($q) use ($filter) { |
|
24 | 24 | return $q->where('email', 'LIKE', '%'.$filter.'%') |
25 | 25 | ->orWhere('name', 'LIKE', '%'.$filter.'%'); |
26 | 26 | }); |
@@ -71,7 +71,7 @@ |
||
71 | 71 | |
72 | 72 | public function generate2faKey() |
73 | 73 | { |
74 | - if (! $this->google2fa_secret) { |
|
74 | + if (!$this->google2fa_secret) { |
|
75 | 75 | $google2fa = new Google2FA(); |
76 | 76 | |
77 | 77 | $this->google2fa_secret = $google2fa->generateSecretKey(); |
@@ -68,7 +68,7 @@ |
||
68 | 68 | { |
69 | 69 | parent::boot(); |
70 | 70 | |
71 | - static::creating(function ($subscription) { |
|
71 | + static::creating(function($subscription) { |
|
72 | 72 | $subscription->unsubscribe = str_random(25); |
73 | 73 | }); |
74 | 74 | } |
@@ -34,6 +34,6 @@ |
||
34 | 34 | { |
35 | 35 | return $this->markdown('emails.lists.imported') |
36 | 36 | ->subject(trans('emails.lists.imported.subject')) |
37 | - ->with(['list' => $this->list]); |
|
37 | + ->with([ 'list' => $this->list ]); |
|
38 | 38 | } |
39 | 39 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | public function build() |
33 | 33 | { |
34 | - return $this->markdown('emails.campaigns.send', ['campaign' => $this->campaign->name, 'subscribers' => count($this->subscriptions)]) |
|
34 | + return $this->markdown('emails.campaigns.send', [ 'campaign' => $this->campaign->name, 'subscribers' => count($this->subscriptions) ]) |
|
35 | 35 | ->subject(trans('emails.campaigns.send.subject')); |
36 | 36 | } |
37 | 37 | } |
@@ -45,9 +45,9 @@ |
||
45 | 45 | '%email%' => $this->subscription->email, |
46 | 46 | '%name%' => $this->subscription->name, |
47 | 47 | '%country%' => countries($this->subscription->country), |
48 | - '%unsubscribe_link%' => route('subscriptions.preunsubscribe', [$this->subscription->email, $this->subscription->unsubscribe]) |
|
48 | + '%unsubscribe_link%' => route('subscriptions.preunsubscribe', [ $this->subscription->email, $this->subscription->unsubscribe ]) |
|
49 | 49 | ], $this->template->content) |
50 | - ])->withSwiftMessage(function ($message) { |
|
50 | + ])->withSwiftMessage(function($message) { |
|
51 | 51 | $headers = $message->getHeaders(); |
52 | 52 | $headers->addTextHeader('X-Campaign-ID', $this->campaign->id); |
53 | 53 | }); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * |
13 | 13 | * @var array |
14 | 14 | */ |
15 | - public $relations = []; |
|
15 | + public $relations = [ ]; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * @param $name |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * |
13 | 13 | * @var array |
14 | 14 | */ |
15 | - public $relations = []; |
|
15 | + public $relations = [ ]; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * @param $name |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | |
57 | 57 | $chunk = ceil($lists->count() / 4); |
58 | 58 | |
59 | - $lists->each(function ($list) use ($chunk) { |
|
60 | - $list->subscriptions()->chunk($chunk, function ($subscriptions) { |
|
61 | - $subscriptions->each(function ($subscription) { |
|
59 | + $lists->each(function($list) use ($chunk) { |
|
60 | + $list->subscriptions()->chunk($chunk, function($subscriptions) { |
|
61 | + $subscriptions->each(function($subscription) { |
|
62 | 62 | Mail::to($subscription)->queue(new CampaignMail($subscription, $this->campaign, $this->template)); |
63 | 63 | }); |
64 | 64 | }); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | 'send' => 1 |
69 | 69 | ]); |
70 | 70 | |
71 | - if ($this->user->preferences['notifications']) { |
|
71 | + if ($this->user->preferences[ 'notifications' ]) { |
|
72 | 72 | Mail::to($this->user)->queue(new CampaignSendMail($this->campaign->getSubscriptions(), $this->campaign)); |
73 | 73 | } |
74 | 74 | } |