@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace App; |
4 | 4 | |
5 | -use Illuminate\Database\Eloquent\Model; |
|
6 | -use Illuminate\Database\Eloquent\SoftDeletes; |
|
5 | +use Illuminate\Database\Eloquent\Model; |
|
6 | +use Illuminate\Database\Eloquent\SoftDeletes; |
|
7 | 7 | use Distilleries\MailerSaver\Contracts\MailModelContract; |
8 | 8 | |
9 | 9 | /** |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | */ |
71 | 71 | public function getTemplate($view) |
72 | 72 | { |
73 | - if (! empty($this->action)){ |
|
73 | + if (!empty($this->action)) { |
|
74 | 74 | return $this->content; |
75 | 75 | } |
76 | 76 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function getCc() |
100 | 100 | { |
101 | - return ! empty($this->cc) ? explode(',', $this->cc) : []; |
|
101 | + return !empty($this->cc) ? explode(',', $this->cc) : []; |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
@@ -106,6 +106,6 @@ discard block |
||
106 | 106 | */ |
107 | 107 | public function getBcc() |
108 | 108 | { |
109 | - return ! empty($this->bcc) ? explode(',', $this->bcc) : []; |
|
109 | + return !empty($this->bcc) ? explode(',', $this->bcc) : []; |
|
110 | 110 | } |
111 | 111 | } |
@@ -54,10 +54,10 @@ discard block |
||
54 | 54 | $body = empty($body) ? $this->views->make($view, $data)->render() : $body; |
55 | 55 | |
56 | 56 | $subjectTemplate = $this->model->getSubject(); |
57 | - if (! empty($subjectTemplate)) { |
|
57 | + if (!empty($subjectTemplate)) { |
|
58 | 58 | $subject = view([ |
59 | 59 | 'template' => $subjectTemplate, |
60 | - 'cache_key' => uniqid() . rand(), |
|
60 | + 'cache_key' => uniqid().rand(), |
|
61 | 61 | 'updated_at' => 0, |
62 | 62 | ], $data); |
63 | 63 | $data['subject'] = $subject->render(); |
@@ -91,9 +91,9 @@ discard block |
||
91 | 91 | |
92 | 92 | $model = $this->model->initByTemplate($view); |
93 | 93 | $template = $model->where('action', $view)->first(); |
94 | - $plain = ! empty($template) ? $template->getPlain() : $plain; |
|
94 | + $plain = !empty($template) ? $template->getPlain() : $plain; |
|
95 | 95 | |
96 | - if (! empty($template)) { |
|
96 | + if (!empty($template)) { |
|
97 | 97 | $this->model = $template; |
98 | 98 | } |
99 | 99 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | public function addSubject($message) |
123 | 123 | { |
124 | 124 | $subject = $this->model->getSubject(); |
125 | - if (! empty($subject)) { |
|
125 | + if (!empty($subject)) { |
|
126 | 126 | $message->setSubject($subject); |
127 | 127 | } |
128 | 128 | } |
@@ -135,8 +135,8 @@ discard block |
||
135 | 135 | */ |
136 | 136 | public function addCc($message) |
137 | 137 | { |
138 | - $cc = $this->isOverride() ? $this->override['cc'] : (! empty($this->model) ? $this->model->getCc() : ''); |
|
139 | - if (! empty($cc)) { |
|
138 | + $cc = $this->isOverride() ? $this->override['cc'] : (!empty($this->model) ? $this->model->getCc() : ''); |
|
139 | + if (!empty($cc)) { |
|
140 | 140 | $message->setCc($cc); |
141 | 141 | } |
142 | 142 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | public function addBcc($message) |
151 | 151 | { |
152 | 152 | $bcc = $this->isOverride() ? $this->override['bcc'] : $this->model->getBcc(); |
153 | - if (! empty($bcc)) { |
|
153 | + if (!empty($bcc)) { |
|
154 | 154 | $message->setBcc($bcc); |
155 | 155 | } |
156 | 156 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | public function overrideTo($message) |
165 | 165 | { |
166 | 166 | $to = $this->isOverride() ? $this->override['to'] : ''; |
167 | - if (! empty($to)) { |
|
167 | + if (!empty($to)) { |
|
168 | 168 | $message->setTo($to); |
169 | 169 | } |
170 | 170 | } |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | interface MailModelContract |
6 | 6 | { |
7 | - /** |
|
7 | + /** |
|
8 | 8 | * Scope a new query with given action. |
9 | 9 | * |
10 | 10 | * @param string $view |