@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | ]; |
23 | 23 | |
24 | 24 | /** |
25 | - * @var Email |
|
26 | - */ |
|
25 | + * @var Email |
|
26 | + */ |
|
27 | 27 | protected $mailer; |
28 | 28 | |
29 | 29 | private ?Mailer $transporter = null; |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | |
161 | 161 | |
162 | 162 | /** |
163 | - * {@inheritDoc} |
|
163 | + * {@inheritDoc} |
|
164 | 164 | */ |
165 | 165 | public function alt(string $content) : self |
166 | 166 | { |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | } |
169 | 169 | |
170 | 170 | /** |
171 | - * {@inheritDoc} |
|
171 | + * {@inheritDoc} |
|
172 | 172 | */ |
173 | 173 | public function attach(array|string $path, string $name = '', string $type = '', string $encoding = self::ENCODING_BASE64, string $disposition = 'attachment'): self |
174 | 174 | { |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | } |
185 | 185 | |
186 | 186 | /** |
187 | - * {@inheritDoc} |
|
187 | + * {@inheritDoc} |
|
188 | 188 | */ |
189 | 189 | public function attachBinary($binary, string $name, string $encoding = self::ENCODING_BASE64, string $type = '', string $disposition = 'attachment'): self |
190 | 190 | { |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | } |
211 | 211 | |
212 | 212 | /** |
213 | - * {@inheritDoc} |
|
213 | + * {@inheritDoc} |
|
214 | 214 | */ |
215 | 215 | public function cc(array|string $address, bool|string $name = '', bool $set = false): self |
216 | 216 | { |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | } |
260 | 260 | |
261 | 261 | /** |
262 | - * {@inheritDoc} |
|
262 | + * {@inheritDoc} |
|
263 | 263 | */ |
264 | 264 | public function from(string $address, string $name = ''): self |
265 | 265 | { |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | } |
270 | 270 | |
271 | 271 | /** |
272 | - * {@inheritDoc} |
|
272 | + * {@inheritDoc} |
|
273 | 273 | */ |
274 | 274 | public function header(array|string $name, ?string $value = null): self |
275 | 275 | { |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | } |
296 | 296 | |
297 | 297 | /** |
298 | - * {@inheritDoc} |
|
298 | + * {@inheritDoc} |
|
299 | 299 | */ |
300 | 300 | public function message(string $message): self |
301 | 301 | { |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | } |
304 | 304 | |
305 | 305 | /** |
306 | - * {@inheritDoc} |
|
306 | + * {@inheritDoc} |
|
307 | 307 | */ |
308 | 308 | public function replyTo(array|string $address, bool|string $name = '', bool $set = false): self |
309 | 309 | { |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | } |
350 | 350 | |
351 | 351 | /** |
352 | - * {@inheritDoc} |
|
352 | + * {@inheritDoc} |
|
353 | 353 | */ |
354 | 354 | public function subject(string $subject) : self |
355 | 355 | { |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | } |
370 | 370 | |
371 | 371 | /** |
372 | - * {@inheritDoc} |
|
372 | + * {@inheritDoc} |
|
373 | 373 | */ |
374 | 374 | public function to(array|string $address, bool|string $name = '', bool $set = false): self |
375 | 375 | { |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | } |
386 | 386 | |
387 | 387 | /** |
388 | - * {@inheritDoc} |
|
388 | + * {@inheritDoc} |
|
389 | 389 | */ |
390 | 390 | public function lastId(): string |
391 | 391 | { |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | |
419 | 419 | private function buildDsn(): string |
420 | 420 | { |
421 | - if (! empty($this->dsn)) { |
|
421 | + if (!empty($this->dsn)) { |
|
422 | 422 | return $this->dsn; |
423 | 423 | } |
424 | 424 | |
@@ -426,8 +426,8 @@ discard block |
||
426 | 426 | static::PROTOCOL_SMTP => "smtp://{$this->username}:{$this->password}@{$this->host}:{$this->port}", |
427 | 427 | static::PROTOCOL_SENDMAIL => "sendmail://default", |
428 | 428 | static::PROTOCOL_MAIL => "sendmail://default", |
429 | - static::PROTOCOL_POSTMARK => "postmark+smtp://{$this->username}@default", // username joue le role de ID |
|
430 | - static::PROTOCOL_SENDGRID => "sendgrid+smtp://apikey:{$this->username}@default", // username joue le role de API_KEY |
|
429 | + static::PROTOCOL_POSTMARK => "postmark+smtp://{$this->username}@default", // username joue le role de ID |
|
430 | + static::PROTOCOL_SENDGRID => "sendgrid+smtp://apikey:{$this->username}@default", // username joue le role de API_KEY |
|
431 | 431 | default => "{$this->protocol}+smtp://{$this->username}:{$this->password}@default", |
432 | 432 | }; |
433 | 433 | } |
@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | ]; |
17 | 17 | |
18 | 18 | /** |
19 | - * @var Mailer |
|
20 | - */ |
|
19 | + * @var Mailer |
|
20 | + */ |
|
21 | 21 | protected $mailer; |
22 | 22 | |
23 | 23 | public function __construct(bool $debug = false) |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | |
162 | 162 | |
163 | 163 | /** |
164 | - * {@inheritDoc} |
|
164 | + * {@inheritDoc} |
|
165 | 165 | */ |
166 | 166 | public function alt(string $content) : self |
167 | 167 | { |
@@ -171,8 +171,8 @@ discard block |
||
171 | 171 | } |
172 | 172 | |
173 | 173 | /** |
174 | - * {@inheritDoc} |
|
175 | - * |
|
174 | + * {@inheritDoc} |
|
175 | + * |
|
176 | 176 | * @throws \PHPMailer\PHPMailer\Exception |
177 | 177 | */ |
178 | 178 | public function attach(array|string $path, string $name = '', string $type = '', string $encoding = self::ENCODING_BASE64, string $disposition = 'attachment'): self |
@@ -189,8 +189,8 @@ discard block |
||
189 | 189 | } |
190 | 190 | |
191 | 191 | /** |
192 | - * {@inheritDoc} |
|
193 | - * |
|
192 | + * {@inheritDoc} |
|
193 | + * |
|
194 | 194 | * @throws \PHPMailer\PHPMailer\Exception |
195 | 195 | */ |
196 | 196 | public function attachBinary($binary, string $name, string $type = '', string $encoding = self::ENCODING_BASE64, string $disposition = 'attachment'): self |
@@ -221,8 +221,8 @@ discard block |
||
221 | 221 | } |
222 | 222 | |
223 | 223 | /** |
224 | - * {@inheritDoc} |
|
225 | - * |
|
224 | + * {@inheritDoc} |
|
225 | + * |
|
226 | 226 | * @throws \PHPMailer\PHPMailer\Exception |
227 | 227 | */ |
228 | 228 | public function cc(array|string $address, bool|string $name = '', bool $set = false): self |
@@ -255,8 +255,8 @@ discard block |
||
255 | 255 | } |
256 | 256 | |
257 | 257 | /** |
258 | - * {@inheritDoc} |
|
259 | - * |
|
258 | + * {@inheritDoc} |
|
259 | + * |
|
260 | 260 | * @throws \PHPMailer\PHPMailer\Exception |
261 | 261 | */ |
262 | 262 | public function embedded(string $path, string $cid, string $name = '', string $type = '', string $encoding = self::ENCODING_BASE64, string $disposition = 'inline'): self |
@@ -267,8 +267,8 @@ discard block |
||
267 | 267 | } |
268 | 268 | |
269 | 269 | /** |
270 | - * {@inheritDoc} |
|
271 | - * |
|
270 | + * {@inheritDoc} |
|
271 | + * |
|
272 | 272 | * @throws \PHPMailer\PHPMailer\Exception |
273 | 273 | */ |
274 | 274 | public function embeddedBinary($binary, string $cid, string $name = '', string $type = '', string $encoding = self::ENCODING_BASE64, string $disposition = 'inline'): self |
@@ -279,8 +279,8 @@ discard block |
||
279 | 279 | } |
280 | 280 | |
281 | 281 | /** |
282 | - * {@inheritDoc} |
|
283 | - * |
|
282 | + * {@inheritDoc} |
|
283 | + * |
|
284 | 284 | * @throws \PHPMailer\PHPMailer\Exception |
285 | 285 | */ |
286 | 286 | public function from(string $address, string $name = '') : self |
@@ -291,8 +291,8 @@ discard block |
||
291 | 291 | } |
292 | 292 | |
293 | 293 | /** |
294 | - * {@inheritDoc} |
|
295 | - * |
|
294 | + * {@inheritDoc} |
|
295 | + * |
|
296 | 296 | * @throws \PHPMailer\PHPMailer\Exception |
297 | 297 | */ |
298 | 298 | public function header(array|string $name, ?string $value = null) : self |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | } |
320 | 320 | |
321 | 321 | /** |
322 | - * {@inheritDoc} |
|
322 | + * {@inheritDoc} |
|
323 | 323 | */ |
324 | 324 | public function lastId(): string |
325 | 325 | { |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | } |
328 | 328 | |
329 | 329 | /** |
330 | - * {@inheritDoc} |
|
330 | + * {@inheritDoc} |
|
331 | 331 | */ |
332 | 332 | public function message(string $message): self |
333 | 333 | { |
@@ -337,8 +337,8 @@ discard block |
||
337 | 337 | } |
338 | 338 | |
339 | 339 | /** |
340 | - * {@inheritDoc} |
|
341 | - * |
|
340 | + * {@inheritDoc} |
|
341 | + * |
|
342 | 342 | * @throws \PHPMailer\PHPMailer\Exception |
343 | 343 | */ |
344 | 344 | public function replyTo(array|string $address, bool|string $name = '', bool $set = false): self |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | } |
378 | 378 | |
379 | 379 | /** |
380 | - * {@inheritDoc} |
|
380 | + * {@inheritDoc} |
|
381 | 381 | */ |
382 | 382 | public function subject(string $subject): self |
383 | 383 | { |
@@ -397,8 +397,8 @@ discard block |
||
397 | 397 | } |
398 | 398 | |
399 | 399 | /** |
400 | - * {@inheritDoc} |
|
401 | - * |
|
400 | + * {@inheritDoc} |
|
401 | + * |
|
402 | 402 | * @throws \PHPMailer\PHPMailer\Exception |
403 | 403 | */ |
404 | 404 | public function to(array|string $address, bool|string $name = '', bool $set = false): self |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | public const ICAL_METHOD_DECLINECOUNTER = 'DECLINECOUNTER'; |
50 | 50 | |
51 | 51 | /** |
52 | - * Ajoute un texte alternatif pour le message en cas de nom prise en charge du html |
|
52 | + * Ajoute un texte alternatif pour le message en cas de nom prise en charge du html |
|
53 | 53 | */ |
54 | 54 | public function alt(string $content): self; |
55 | 55 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | public function header(array|string $name, ?string $value = null): self; |
111 | 111 | |
112 | 112 | /** |
113 | - * Defini le message Ă envoyer au format html |
|
113 | + * Defini le message Ă envoyer au format html |
|
114 | 114 | */ |
115 | 115 | public function html(string $content): self; |
116 | 116 | |
@@ -120,12 +120,12 @@ discard block |
||
120 | 120 | public function init(array $config): self; |
121 | 121 | |
122 | 122 | /** |
123 | - * Renvoie l'identifiant du dernier mail envoyé |
|
123 | + * Renvoie l'identifiant du dernier mail envoyé |
|
124 | 124 | */ |
125 | 125 | public function lastId(): string; |
126 | 126 | |
127 | 127 | /** |
128 | - * Defini le message Ă envoyer |
|
128 | + * Defini le message Ă envoyer |
|
129 | 129 | */ |
130 | 130 | public function message(string $message) : self; |
131 | 131 | |
@@ -150,17 +150,17 @@ discard block |
||
150 | 150 | public function sign(string $cert_filename, string $key_filename, string $key_pass, string $extracerts_filename = ''): self; |
151 | 151 | |
152 | 152 | /** |
153 | - * Defini le sujet du mail |
|
153 | + * Defini le sujet du mail |
|
154 | 154 | */ |
155 | 155 | public function subject(string $subject): self; |
156 | 156 | |
157 | 157 | /** |
158 | - * Defini le message Ă envoyer au format texte |
|
158 | + * Defini le message Ă envoyer au format texte |
|
159 | 159 | */ |
160 | 160 | public function text(string $content): self; |
161 | 161 | |
162 | 162 | /** |
163 | - * Ajoute l'adresse de destination (To) du mail |
|
163 | + * Ajoute l'adresse de destination (To) du mail |
|
164 | 164 | */ |
165 | 165 | public function to(array|string $address, bool|string $name = '', bool $set = false): self; |
166 | 166 | } |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | } |
124 | 124 | |
125 | 125 | /** |
126 | - * {@inheritDoc} |
|
126 | + * {@inheritDoc} |
|
127 | 127 | */ |
128 | 128 | public function alt(string $content) : self |
129 | 129 | { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | } |
134 | 134 | |
135 | 135 | /** |
136 | - * {@inheritDoc} |
|
136 | + * {@inheritDoc} |
|
137 | 137 | */ |
138 | 138 | public function attach(array|string $path, string $name = '', string $type = '', string $encoding = self::ENCODING_BASE64, string $disposition = 'attachment'): self |
139 | 139 | { |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | } |
164 | 164 | |
165 | 165 | /** |
166 | - * {@inheritDoc} |
|
166 | + * {@inheritDoc} |
|
167 | 167 | */ |
168 | 168 | public function cc(array|string $address, bool|string $name = '', bool $set = false): self |
169 | 169 | { |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | } |
184 | 184 | |
185 | 185 | /** |
186 | - * {@inheritDoc} |
|
186 | + * {@inheritDoc} |
|
187 | 187 | */ |
188 | 188 | public function embedded(string $path, string $cid, string $name = '', string $type = '', string $encoding = self::ENCODING_BASE64, string $disposition = 'inline'): self |
189 | 189 | { |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | } |
194 | 194 | |
195 | 195 | /** |
196 | - * {@inheritDoc} |
|
196 | + * {@inheritDoc} |
|
197 | 197 | */ |
198 | 198 | public function embeddedBinary($binary, string $cid, string $name = '', string $type = '', string $encoding = self::ENCODING_BASE64, string $disposition = 'inline'): self |
199 | 199 | { |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | } |
204 | 204 | |
205 | 205 | /** |
206 | - * {@inheritDoc} |
|
206 | + * {@inheritDoc} |
|
207 | 207 | */ |
208 | 208 | public function from(string $address, string $name = ''): self |
209 | 209 | { |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | } |
214 | 214 | |
215 | 215 | /** |
216 | - * {@inheritDoc} |
|
216 | + * {@inheritDoc} |
|
217 | 217 | */ |
218 | 218 | public function header(array|string $name, ?string $value = null): self |
219 | 219 | { |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | } |
242 | 242 | |
243 | 243 | /** |
244 | - * {@inheritDoc} |
|
244 | + * {@inheritDoc} |
|
245 | 245 | */ |
246 | 246 | public function message(string $message): self |
247 | 247 | { |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | } |
254 | 254 | |
255 | 255 | /** |
256 | - * {@inheritDoc} |
|
256 | + * {@inheritDoc} |
|
257 | 257 | */ |
258 | 258 | public function replyTo(array|string $address, bool|string $name = '', bool $set = false): self |
259 | 259 | { |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | } |
282 | 282 | |
283 | 283 | /** |
284 | - * {@inheritDoc} |
|
284 | + * {@inheritDoc} |
|
285 | 285 | */ |
286 | 286 | public function subject(string $subject) : self |
287 | 287 | { |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | } |
302 | 302 | |
303 | 303 | /** |
304 | - * {@inheritDoc} |
|
304 | + * {@inheritDoc} |
|
305 | 305 | */ |
306 | 306 | public function to(array|string $address, bool|string $name = '', bool $set = false): self |
307 | 307 | { |
@@ -89,11 +89,11 @@ discard block |
||
89 | 89 | */ |
90 | 90 | protected function factory(): AbstractAdapter |
91 | 91 | { |
92 | - if (! empty($this->adapter)) { |
|
92 | + if (!empty($this->adapter)) { |
|
93 | 93 | return $this->adapter; |
94 | 94 | } |
95 | 95 | |
96 | - $handler = $this->config['handler'] ?? null; |
|
96 | + $handler = $this->config['handler'] ?? null; |
|
97 | 97 | |
98 | 98 | if (empty($handler)) { |
99 | 99 | throw new InvalidArgumentException(lang('Mail.undefinedHandler')); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $handler = static::$validHandlers[$handler]; |
104 | 104 | } |
105 | 105 | |
106 | - if (! class_exists($handler)) { |
|
106 | + if (!class_exists($handler)) { |
|
107 | 107 | throw new InvalidArgumentException(lang('Mail.invalidHandler', [$handler])); |
108 | 108 | } |
109 | 109 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $debug = on_dev(); |
113 | 113 | } |
114 | 114 | |
115 | - if (! is_subclass_of($handler, AbstractAdapter::class)) { |
|
115 | + if (!is_subclass_of($handler, AbstractAdapter::class)) { |
|
116 | 116 | throw new InvalidArgumentException(lang('Mail.handlerMustExtendClass', [$handler, AbstractAdapter::class])); |
117 | 117 | } |
118 | 118 | |
@@ -320,13 +320,13 @@ discard block |
||
320 | 320 | // N'est-il pas namespaced ? on cherche le dossier en fonction du parametre "view_base" |
321 | 321 | if (strpos($view, '\\') === false) { |
322 | 322 | $path = $this->config['view_dir'] ?? ''; |
323 | - if (! empty($path)) { |
|
323 | + if (!empty($path)) { |
|
324 | 324 | $path .= '/'; |
325 | 325 | } |
326 | 326 | } |
327 | 327 | |
328 | 328 | $view = view($path . $view, $data); |
329 | - if (! empty($this->config['template'])) { |
|
329 | + if (!empty($this->config['template'])) { |
|
330 | 330 | $view->setLayout($this->config['template']); |
331 | 331 | } |
332 | 332 |