@@ -57,11 +57,11 @@ discard block |
||
57 | 57 | $group = on_test() ? 'test' : (on_prod() ? 'production' : 'development'); |
58 | 58 | } |
59 | 59 | |
60 | - if (! isset($config[$group]) && strpos($group, 'custom-') === false) { |
|
60 | + if (!isset($config[$group]) && strpos($group, 'custom-') === false) { |
|
61 | 61 | $group = 'default'; |
62 | 62 | } |
63 | 63 | |
64 | - if (is_string($group) && ! isset($config[$group]) && strpos($group, 'custom-') !== 0) { |
|
64 | + if (is_string($group) && !isset($config[$group]) && strpos($group, 'custom-') !== 0) { |
|
65 | 65 | throw new InvalidArgumentException($group . ' is not a valid database connection group.'); |
66 | 66 | } |
67 | 67 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | $config = $config[$group]; |
73 | 73 | |
74 | - if (str_contains($config['driver'], 'sqlite') && $config['database'] !== ':memory:' && ! str_contains($config['database'], DS)) { |
|
74 | + if (str_contains($config['driver'], 'sqlite') && $config['database'] !== ':memory:' && !str_contains($config['database'], DS)) { |
|
75 | 75 | $config['database'] = APP_STORAGE_PATH . $config['database']; |
76 | 76 | } |
77 | 77 |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $controller = $routes->getDefaultController(); |
178 | 178 | } |
179 | 179 | |
180 | - if (! $fullName && is_string($controller)) { |
|
180 | + if (!$fullName && is_string($controller)) { |
|
181 | 181 | $controller = str_replace($routes->getDefaultNamespace(), '', $controller); |
182 | 182 | } |
183 | 183 | |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | require_once $routes_file; |
279 | 279 | } |
280 | 280 | } |
281 | - if (empty($routes) || ! ($routes instanceof RouteCollection)) { |
|
281 | + if (empty($routes) || !($routes instanceof RouteCollection)) { |
|
282 | 282 | $routes = Services::routes(); |
283 | 283 | } |
284 | 284 | |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | */ |
307 | 307 | $this->gatherOutput($this->middleware->handle($this->request)); |
308 | 308 | |
309 | - if (! $returnResponse) { |
|
309 | + if (!$returnResponse) { |
|
310 | 310 | $this->sendResponse(); |
311 | 311 | } |
312 | 312 | |
@@ -354,14 +354,14 @@ discard block |
||
354 | 354 | return; |
355 | 355 | } |
356 | 356 | |
357 | - if (is_cli() && ! on_test()) { |
|
357 | + if (is_cli() && !on_test()) { |
|
358 | 358 | // @codeCoverageIgnoreStart |
359 | 359 | // $this->request = Services::clirequest($this->config); |
360 | 360 | // @codeCoverageIgnoreEnd |
361 | 361 | } |
362 | 362 | |
363 | 363 | $version = $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.1'; |
364 | - if (! is_numeric($version)) { |
|
364 | + if (!is_numeric($version)) { |
|
365 | 365 | $version = substr($version, strpos($version, '/') + 1); |
366 | 366 | } |
367 | 367 | |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | // Supposons le succès jusqu'à preuve du contraire. |
381 | 381 | $this->response = Services::response()->withStatus(200); |
382 | 382 | |
383 | - if (! is_cli() || on_test()) { |
|
383 | + if (!is_cli() || on_test()) { |
|
384 | 384 | } |
385 | 385 | |
386 | 386 | $this->response = $this->response->withProtocolVersion($this->request->getProtocolVersion()); |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | { |
417 | 417 | if ($cachedResponse = Services::cache()->read($this->generateCacheName())) { |
418 | 418 | $cachedResponse = unserialize($cachedResponse); |
419 | - if (! is_array($cachedResponse) || ! isset($cachedResponse['output']) || ! isset($cachedResponse['headers'])) { |
|
419 | + if (!is_array($cachedResponse) || !isset($cachedResponse['output']) || !isset($cachedResponse['headers'])) { |
|
420 | 420 | throw new FrameworkException('Error unserializing page cache'); |
421 | 421 | } |
422 | 422 | |
@@ -545,7 +545,7 @@ discard block |
||
545 | 545 | */ |
546 | 546 | protected function determinePath(): string |
547 | 547 | { |
548 | - if (! empty($this->path)) { |
|
548 | + if (!empty($this->path)) { |
|
549 | 549 | return $this->path; |
550 | 550 | } |
551 | 551 | |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | } |
600 | 600 | |
601 | 601 | // Essayez de charger automatiquement la classe |
602 | - if (! class_exists($this->controller, true) || $this->method[0] === '_') { |
|
602 | + if (!class_exists($this->controller, true) || $this->method[0] === '_') { |
|
603 | 603 | throw PageNotFoundException::controllerNotFound($this->controller, $this->method); |
604 | 604 | } |
605 | 605 | |
@@ -687,7 +687,7 @@ discard block |
||
687 | 687 | // Affiche l'erreur 404 |
688 | 688 | $this->response = $this->response->withStatus($e->getCode()); |
689 | 689 | |
690 | - if (! on_test()) { |
|
690 | + if (!on_test()) { |
|
691 | 691 | // @codeCoverageIgnoreStart |
692 | 692 | if (ob_get_level() > 0) { |
693 | 693 | ob_end_flush(); |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | ob_end_flush(); // @codeCoverageIgnore |
700 | 700 | } |
701 | 701 | |
702 | - throw PageNotFoundException::pageNotFound(! on_prod() || is_cli() ? $e->getMessage() : ''); |
|
702 | + throw PageNotFoundException::pageNotFound(!on_prod() || is_cli() ? $e->getMessage() : ''); |
|
703 | 703 | } |
704 | 704 | |
705 | 705 | /** |
@@ -754,7 +754,7 @@ discard block |
||
754 | 754 | public function storePreviousURL($uri) |
755 | 755 | { |
756 | 756 | // Ignorer les requĂŞtes CLI |
757 | - if (is_cli() && ! on_test()) { |
|
757 | + if (is_cli() && !on_test()) { |
|
758 | 758 | return; // @codeCoverageIgnore |
759 | 759 | } |
760 | 760 | |
@@ -855,7 +855,7 @@ discard block |
||
855 | 855 | $this->middleware = Services::injector()->make(Middleware::class, ['response' => $this->response]); |
856 | 856 | |
857 | 857 | $middlewaresFile = CONFIG_PATH . 'middlewares.php'; |
858 | - if (file_exists($middlewaresFile) && ! in_array($middlewaresFile, get_included_files(), true)) { |
|
858 | + if (file_exists($middlewaresFile) && !in_array($middlewaresFile, get_included_files(), true)) { |
|
859 | 859 | $middleware = require $middlewaresFile; |
860 | 860 | if (is_callable($middleware)) { |
861 | 861 | $middlewareQueue = $middleware($this->middleware, $this->request); |
@@ -874,11 +874,11 @@ discard block |
||
874 | 874 | */ |
875 | 875 | private function spoofRequestMethod(): callable |
876 | 876 | { |
877 | - return static function (ServerRequestInterface $request, ResponseInterface $response, callable $next) { |
|
877 | + return static function(ServerRequestInterface $request, ResponseInterface $response, callable $next) { |
|
878 | 878 | $post = $request->getParsedBody(); |
879 | 879 | |
880 | 880 | // Ne fonctionne qu'avec les formulaires POST |
881 | - if (strtoupper($request->getMethod()) === 'POST' && ! empty($post['_method'])) { |
|
881 | + if (strtoupper($request->getMethod()) === 'POST' && !empty($post['_method'])) { |
|
882 | 882 | // Accepte seulement PUT, PATCH, DELETE |
883 | 883 | if (in_array(strtoupper($post['_method']), ['PUT', 'PATCH', 'DELETE'], true)) { |
884 | 884 | $request = $request->withMethod($post['_method']); |
@@ -893,15 +893,15 @@ discard block |
||
893 | 893 | { |
894 | 894 | $_this = $this; |
895 | 895 | |
896 | - return static function (ServerRequestInterface $request, ResponseInterface $response, callable $next) use($_this): ResponseInterface { |
|
896 | + return static function(ServerRequestInterface $request, ResponseInterface $response, callable $next) use($_this): ResponseInterface { |
|
897 | 897 | try { |
898 | 898 | $returned = $_this->startController($request, $response); |
899 | 899 | |
900 | 900 | // Closure controller has run in startController(). |
901 | - if (! is_callable($_this->controller)) { |
|
901 | + if (!is_callable($_this->controller)) { |
|
902 | 902 | $controller = $_this->createController($request, $response); |
903 | 903 | |
904 | - if (! method_exists($controller, '_remap') && ! is_callable([$controller, $_this->method], false)) { |
|
904 | + if (!method_exists($controller, '_remap') && !is_callable([$controller, $_this->method], false)) { |
|
905 | 905 | throw PageNotFoundException::methodNotFound($_this->method); |
906 | 906 | } |
907 | 907 |
@@ -828,8 +828,7 @@ discard block |
||
828 | 828 | |
829 | 829 | try { |
830 | 830 | $response = $response->withBody(to_stream($returned)); |
831 | - } |
|
832 | - catch (InvalidArgumentException $e) { |
|
831 | + } catch (InvalidArgumentException $e) { |
|
833 | 832 | } |
834 | 833 | |
835 | 834 | return $response; |
@@ -917,8 +916,7 @@ discard block |
||
917 | 916 | Services::event()->trigger('post_system'); |
918 | 917 | |
919 | 918 | return $_this->formatResponse($response, $returned); |
920 | - } |
|
921 | - catch (ValidationException $e) { |
|
919 | + } catch (ValidationException $e) { |
|
922 | 920 | $code = $e->getCode(); |
923 | 921 | $errors = $e->getErrors(); |
924 | 922 | if (empty($errors)) { |
@@ -929,8 +927,7 @@ discard block |
||
929 | 927 | if (strtoupper($request->getMethod()) === 'POST') { |
930 | 928 | if (is_subclass_of($_this->controller, ApplicationController::class)) { |
931 | 929 | return Services::redirection()->back()->withInput()->withErrors($errors)->withStatus($code); |
932 | - } |
|
933 | - else if (is_subclass_of($_this->controller, RestController::class)) { |
|
930 | + } else if (is_subclass_of($_this->controller, RestController::class)) { |
|
934 | 931 | return $_this->formatResponse($response->withStatus($code), [ |
935 | 932 | 'success' => false, |
936 | 933 | 'code' => $code, |
@@ -938,8 +935,7 @@ discard block |
||
938 | 935 | ]); |
939 | 936 | } |
940 | 937 | } |
941 | - } |
|
942 | - else if (strtoupper($request->getMethod()) === 'POST') { |
|
938 | + } else if (strtoupper($request->getMethod()) === 'POST') { |
|
943 | 939 | return Services::redirection()->back()->withInput()->withErrors($errors)->withStatus($code); |
944 | 940 | } |
945 | 941 |
@@ -31,11 +31,11 @@ |
||
31 | 31 | if (empty($dependency['class']) || empty($dependency['package'])) { |
32 | 32 | throw new InvalidArgumentException('Invalid dependencies property'); |
33 | 33 | } |
34 | - if (! is_string($dependency['class']) || ! is_string($dependency['package'])) { |
|
34 | + if (!is_string($dependency['class']) || !is_string($dependency['package'])) { |
|
35 | 35 | throw new InvalidArgumentException('Invalid dependencies property'); |
36 | 36 | } |
37 | 37 | |
38 | - if (! class_exists($dependency['class'])) { |
|
38 | + if (!class_exists($dependency['class'])) { |
|
39 | 39 | throw new RuntimeException(lang('Mail.dependancyNotFound', [$dependency['class'], static::class, $dependency['package']])); |
40 | 40 | } |
41 | 41 | } |
@@ -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 |