@@ -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 |
@@ -65,7 +65,7 @@ |
||
65 | 65 | */ |
66 | 66 | public function add($middlewares, array $options = []): self |
67 | 67 | { |
68 | - if (! is_array($middlewares)) { |
|
68 | + if (!is_array($middlewares)) { |
|
69 | 69 | $middlewares = [$middlewares]; |
70 | 70 | } |
71 | 71 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | // ================================= FONCTIONS D'ACCESSIBILITE ================================= // |
27 | 27 | |
28 | -if (! function_exists('env')) { |
|
28 | +if (!function_exists('env')) { |
|
29 | 29 | /** |
30 | 30 | * Obtient une variable d'environnement à partir des sources disponibles et fournit une émulation |
31 | 31 | * pour les variables d'environnement non prises en charge ou incohérentes |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
44 | -if (! function_exists('helper')) { |
|
44 | +if (!function_exists('helper')) { |
|
45 | 45 | /** |
46 | 46 | * Charge un fichier d'aide en mémoire. Prend en charge les assistants d'espace de noms, |
47 | 47 | * à la fois dans et hors du répertoire 'helpers' d'un répertoire à espace de noms. |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | } |
60 | 60 | } |
61 | 61 | |
62 | -if (! function_exists('model')) { |
|
62 | +if (!function_exists('model')) { |
|
63 | 63 | /** |
64 | 64 | * Simple maniere d'obtenir un modele. |
65 | 65 | * |
@@ -69,13 +69,13 @@ discard block |
||
69 | 69 | * |
70 | 70 | * @return T |
71 | 71 | */ |
72 | - function model(string|array $name, ?ConnectionInterface &$conn = null) |
|
72 | + function model(string|array $name, ?ConnectionInterface&$conn = null) |
|
73 | 73 | { |
74 | 74 | return Load::model($name, $conn); |
75 | 75 | } |
76 | 76 | } |
77 | 77 | |
78 | -if (! function_exists('service')) { |
|
78 | +if (!function_exists('service')) { |
|
79 | 79 | /** |
80 | 80 | * Permet un accès plus propre au fichier de configuration des services. |
81 | 81 | * Renvoie toujours une instance SHARED de la classe, donc |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | } |
93 | 93 | } |
94 | 94 | |
95 | -if (! function_exists('single_service')) { |
|
95 | +if (!function_exists('single_service')) { |
|
96 | 96 | /** |
97 | 97 | * Autoriser l'accès propre à un service. |
98 | 98 | * Renvoie toujours une nouvelle instance de la classe. |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | } |
107 | 107 | } |
108 | 108 | |
109 | -if (! function_exists('show404')) { |
|
109 | +if (!function_exists('show404')) { |
|
110 | 110 | /** |
111 | 111 | * Afficher une page 404 introuvable dans le navigateur |
112 | 112 | */ |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | } |
117 | 117 | } |
118 | 118 | |
119 | -if (! function_exists('config')) { |
|
119 | +if (!function_exists('config')) { |
|
120 | 120 | /** |
121 | 121 | * GET/SET App config |
122 | 122 | * |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | */ |
127 | 127 | function config(string $config, $value = null, bool $force_set = false) |
128 | 128 | { |
129 | - if (! empty($value) || (empty($value) && true === $force_set)) { |
|
129 | + if (!empty($value) || (empty($value) && true === $force_set)) { |
|
130 | 130 | Config::set($config, $value); |
131 | 131 | } |
132 | 132 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | |
137 | 137 | // =========================== FONCTIONS DE PREVENTION D'ATTAQUE =========================== // |
138 | 138 | |
139 | -if (! function_exists('esc')) { |
|
139 | +if (!function_exists('esc')) { |
|
140 | 140 | /** |
141 | 141 | * Effectue un simple échappement automatique des données pour des raisons de sécurité. |
142 | 142 | * Pourrait envisager de rendre cela plus complexe à une date ultérieure. |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | } |
164 | 164 | } |
165 | 165 | |
166 | -if (! function_exists('h')) { |
|
166 | +if (!function_exists('h')) { |
|
167 | 167 | /** |
168 | 168 | * Méthode pratique pour htmlspecialchars. |
169 | 169 | * |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | } |
183 | 183 | } |
184 | 184 | |
185 | -if (! function_exists('purify')) { |
|
185 | +if (!function_exists('purify')) { |
|
186 | 186 | /** |
187 | 187 | * Purifiez l'entrée à l'aide de la classe autonome HTMLPurifier. |
188 | 188 | * Utilisez facilement plusieurs configurations de purificateur. |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | } |
201 | 201 | } |
202 | 202 | |
203 | -if (! function_exists('remove_invisible_characters')) { |
|
203 | +if (!function_exists('remove_invisible_characters')) { |
|
204 | 204 | /** |
205 | 205 | * Supprimer les caractères invisibles |
206 | 206 | * |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | } |
214 | 214 | } |
215 | 215 | |
216 | -if (! function_exists('stringify_attributes')) { |
|
216 | +if (!function_exists('stringify_attributes')) { |
|
217 | 217 | /** |
218 | 218 | * Chaîner les attributs à utiliser dans les balises HTML. |
219 | 219 | * |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | |
228 | 228 | // ================================= FONCTIONS D'ENVIRONNEMENT D'EXECUTION ================================= // |
229 | 229 | |
230 | -if (! function_exists('on_dev')) { |
|
230 | +if (!function_exists('on_dev')) { |
|
231 | 231 | /** |
232 | 232 | * Testez pour voir si nous sommes dans un environnement de développement. |
233 | 233 | */ |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | } |
244 | 244 | } |
245 | 245 | |
246 | -if (! function_exists('on_prod')) { |
|
246 | +if (!function_exists('on_prod')) { |
|
247 | 247 | /** |
248 | 248 | * Testez pour voir si nous sommes dans un environnement de production. |
249 | 249 | */ |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | } |
260 | 260 | } |
261 | 261 | |
262 | -if (! function_exists('on_test')) { |
|
262 | +if (!function_exists('on_test')) { |
|
263 | 263 | /** |
264 | 264 | * Testez pour voir si nous sommes dans un environnement de test |
265 | 265 | */ |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | } |
272 | 272 | } |
273 | 273 | |
274 | -if (! function_exists('is_cli')) { |
|
274 | +if (!function_exists('is_cli')) { |
|
275 | 275 | /** |
276 | 276 | * Testez pour voir si une demande a été faite à partir de la ligne de commande. |
277 | 277 | */ |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | } |
282 | 282 | } |
283 | 283 | |
284 | -if (! function_exists('is_php')) { |
|
284 | +if (!function_exists('is_php')) { |
|
285 | 285 | /** |
286 | 286 | * Détermine si la version actuelle de PHP est égale ou supérieure à la valeur fournie. |
287 | 287 | */ |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | } |
292 | 292 | } |
293 | 293 | |
294 | -if (! function_exists('is_windows')) { |
|
294 | +if (!function_exists('is_windows')) { |
|
295 | 295 | /** |
296 | 296 | * Déterminez si l'environnement actuel est basé sur Windows. |
297 | 297 | */ |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | } |
302 | 302 | } |
303 | 303 | |
304 | -if (! function_exists('is_https')) { |
|
304 | +if (!function_exists('is_https')) { |
|
305 | 305 | /** |
306 | 306 | * Determines if the application is accessed via an encrypted * (HTTPS) connection. |
307 | 307 | */ |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | } |
312 | 312 | } |
313 | 313 | |
314 | -if (! function_exists('is_localfile')) { |
|
314 | +if (!function_exists('is_localfile')) { |
|
315 | 315 | /** |
316 | 316 | * Vérifiez si le fichier auquel vous souhaitez accéder est un fichier local de votre application ou non |
317 | 317 | */ |
@@ -321,11 +321,11 @@ discard block |
||
321 | 321 | return true; |
322 | 322 | } |
323 | 323 | |
324 | - return ! preg_match('#^(https?://)#i', $name); |
|
324 | + return !preg_match('#^(https?://)#i', $name); |
|
325 | 325 | } |
326 | 326 | } |
327 | 327 | |
328 | -if (! function_exists('is_online')) { |
|
328 | +if (!function_exists('is_online')) { |
|
329 | 329 | /** |
330 | 330 | * Tester si l'application s'exécute en local ou en ligne. |
331 | 331 | */ |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | } |
336 | 336 | } |
337 | 337 | |
338 | -if (! function_exists('is_connected')) { |
|
338 | +if (!function_exists('is_connected')) { |
|
339 | 339 | /** |
340 | 340 | * Verifie si l'utilisateur a une connexion internet active. |
341 | 341 | */ |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | } |
346 | 346 | } |
347 | 347 | |
348 | -if (! function_exists('is_ajax_request')) { |
|
348 | +if (!function_exists('is_ajax_request')) { |
|
349 | 349 | /** |
350 | 350 | * Testez pour voir si une requête contient l'en-tête HTTP_X_REQUESTED_WITH. |
351 | 351 | */ |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | } |
356 | 356 | } |
357 | 357 | |
358 | -if (! function_exists('redirection')) { |
|
358 | +if (!function_exists('redirection')) { |
|
359 | 359 | /** |
360 | 360 | * Redirige l'utilisateur |
361 | 361 | */ |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | } |
370 | 370 | } |
371 | 371 | |
372 | -if (! function_exists('redirect')) { |
|
372 | +if (!function_exists('redirect')) { |
|
373 | 373 | /** |
374 | 374 | * Méthode pratique qui fonctionne avec la $request globale actuelle et |
375 | 375 | * l'instance $router à rediriger à l'aide de routes nommées et le routage inversé |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | { |
384 | 384 | $redirection = Services::redirection(); |
385 | 385 | |
386 | - if (! empty($uri)) { |
|
386 | + if (!empty($uri)) { |
|
387 | 387 | return $redirection->route($uri); |
388 | 388 | } |
389 | 389 | |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | } |
392 | 392 | } |
393 | 393 | |
394 | -if (! function_exists('link_to')) { |
|
394 | +if (!function_exists('link_to')) { |
|
395 | 395 | /** |
396 | 396 | * Étant donné une chaîne de contrôleur/méthode et tous les paramètres, |
397 | 397 | * tentera de créer l'URL relative à la route correspondante. |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | } |
408 | 408 | } |
409 | 409 | |
410 | -if (! function_exists('clean_path')) { |
|
410 | +if (!function_exists('clean_path')) { |
|
411 | 411 | /** |
412 | 412 | * Une méthode pratique pour nettoyer les chemins pour |
413 | 413 | * une sortie plus belle. Utile pour les exceptions |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | } |
437 | 437 | } |
438 | 438 | |
439 | -if (! function_exists('old')) { |
|
439 | +if (!function_exists('old')) { |
|
440 | 440 | /** |
441 | 441 | * Fournit l'accès à "entrée ancienne" qui a été définie dans la session lors d'un redirect()-withInput(). |
442 | 442 | * |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | |
464 | 464 | // ================================= FONCTIONS DE DEBOGAGE ================================= // |
465 | 465 | |
466 | -if (! function_exists('dd')) { |
|
466 | +if (!function_exists('dd')) { |
|
467 | 467 | /** |
468 | 468 | * Prints a Kint debug report and exits. |
469 | 469 | * |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | } |
483 | 483 | } |
484 | 484 | |
485 | -if (! function_exists('dump')) { |
|
485 | +if (!function_exists('dump')) { |
|
486 | 486 | /** |
487 | 487 | * Prints a Kint debug report and exits. |
488 | 488 | * |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | } |
500 | 500 | } |
501 | 501 | |
502 | -if (! function_exists('deprecationWarning')) { |
|
502 | +if (!function_exists('deprecationWarning')) { |
|
503 | 503 | /** |
504 | 504 | * Méthode d'assistance pour générer des avertissements d'obsolescence |
505 | 505 | * |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | } |
516 | 516 | } |
517 | 517 | |
518 | -if (! function_exists('logger')) { |
|
518 | +if (!function_exists('logger')) { |
|
519 | 519 | /** |
520 | 520 | * A convenience/compatibility method for logging events through |
521 | 521 | * the Log system. |
@@ -538,7 +538,7 @@ discard block |
||
538 | 538 | { |
539 | 539 | $logger = Services::logger(); |
540 | 540 | |
541 | - if (! empty($level) && ! empty($message)) { |
|
541 | + if (!empty($level) && !empty($message)) { |
|
542 | 542 | return $logger->log($level, $message, $context); |
543 | 543 | } |
544 | 544 | |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | } |
547 | 547 | } |
548 | 548 | |
549 | -if (! function_exists('cache')) { |
|
549 | +if (!function_exists('cache')) { |
|
550 | 550 | /** |
551 | 551 | * Une méthode pratique qui donne accès au cache |
552 | 552 | * objet. Si aucun paramètre n'est fourni, renverra l'objet, |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | } |
577 | 577 | } |
578 | 578 | |
579 | -if (! function_exists('session')) { |
|
579 | +if (!function_exists('session')) { |
|
580 | 580 | /** |
581 | 581 | * Une méthode pratique pour accéder à l'instance de session, ou un élément qui a été défini dans la session. |
582 | 582 | * |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | } |
600 | 600 | } |
601 | 601 | |
602 | -if (! function_exists('pr')) { |
|
602 | +if (!function_exists('pr')) { |
|
603 | 603 | /** |
604 | 604 | * print_r() convenience function. |
605 | 605 | * |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | } |
622 | 622 | } |
623 | 623 | |
624 | -if (! function_exists('pj')) { |
|
624 | +if (!function_exists('pj')) { |
|
625 | 625 | /** |
626 | 626 | * json pretty print convenience function. |
627 | 627 | * |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | } |
643 | 643 | } |
644 | 644 | |
645 | -if (! function_exists('trigger_warning')) { |
|
645 | +if (!function_exists('trigger_warning')) { |
|
646 | 646 | /** |
647 | 647 | * Déclenche un E_USER_WARNING. |
648 | 648 | */ |
@@ -652,7 +652,7 @@ discard block |
||
652 | 652 | } |
653 | 653 | } |
654 | 654 | |
655 | -if (! function_exists('vd')) { |
|
655 | +if (!function_exists('vd')) { |
|
656 | 656 | /** |
657 | 657 | * Shortcut to ref, HTML mode |
658 | 658 | * |
@@ -664,7 +664,7 @@ discard block |
||
664 | 664 | } |
665 | 665 | } |
666 | 666 | |
667 | -if (! function_exists('vdt')) { |
|
667 | +if (!function_exists('vdt')) { |
|
668 | 668 | /** |
669 | 669 | * Shortcut to ref, plain text mode |
670 | 670 | * |
@@ -678,7 +678,7 @@ discard block |
||
678 | 678 | |
679 | 679 | // ================================= FONCTIONS DIVERSES ================================= // |
680 | 680 | |
681 | -if (! function_exists('force_https')) { |
|
681 | +if (!function_exists('force_https')) { |
|
682 | 682 | /** |
683 | 683 | * Utilisé pour forcer l'accès à une page via HTTPS. |
684 | 684 | * Utilise une redirection standard, plus définira l'en-tête HSTS |
@@ -736,7 +736,7 @@ discard block |
||
736 | 736 | } |
737 | 737 | } |
738 | 738 | |
739 | -if (! function_exists('getTypeName')) { |
|
739 | +if (!function_exists('getTypeName')) { |
|
740 | 740 | /** |
741 | 741 | * Renvoie la classe d'objets ou le type var de ce n'est pas un objet |
742 | 742 | * |
@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | } |
751 | 751 | } |
752 | 752 | |
753 | -if (! function_exists('ip_address')) { |
|
753 | +if (!function_exists('ip_address')) { |
|
754 | 754 | /** |
755 | 755 | * Renvoie l'adresse IP de l'utilisateur actuel |
756 | 756 | */ |
@@ -760,7 +760,7 @@ discard block |
||
760 | 760 | } |
761 | 761 | } |
762 | 762 | |
763 | -if (! function_exists('is_really_writable')) { |
|
763 | +if (!function_exists('is_really_writable')) { |
|
764 | 764 | /** |
765 | 765 | * Tests d'inscriptibilité des fichiers |
766 | 766 | */ |
@@ -770,7 +770,7 @@ discard block |
||
770 | 770 | } |
771 | 771 | } |
772 | 772 | |
773 | -if (! function_exists('lang')) { |
|
773 | +if (!function_exists('lang')) { |
|
774 | 774 | /** |
775 | 775 | * Une méthode pratique pour traduire une chaîne ou un tableau d'entrées et formater |
776 | 776 | * le résultat avec le MessageFormatter de l'extension intl. |
@@ -781,7 +781,7 @@ discard block |
||
781 | 781 | } |
782 | 782 | } |
783 | 783 | |
784 | -if (! function_exists('namespace_split')) { |
|
784 | +if (!function_exists('namespace_split')) { |
|
785 | 785 | /** |
786 | 786 | * Séparez l'espace de noms du nom de classe. |
787 | 787 | * |
@@ -802,7 +802,7 @@ discard block |
||
802 | 802 | } |
803 | 803 | } |
804 | 804 | |
805 | -if (! function_exists('view_exist')) { |
|
805 | +if (!function_exists('view_exist')) { |
|
806 | 806 | /** |
807 | 807 | * Verifie si un fichier de vue existe. Utile pour limiter les failles include |
808 | 808 | */ |
@@ -816,7 +816,7 @@ discard block |
||
816 | 816 | } |
817 | 817 | } |
818 | 818 | |
819 | -if (! function_exists('view')) { |
|
819 | +if (!function_exists('view')) { |
|
820 | 820 | /** |
821 | 821 | * Charge une vue |
822 | 822 | * |
@@ -832,7 +832,7 @@ discard block |
||
832 | 832 | } |
833 | 833 | } |
834 | 834 | |
835 | -if (! function_exists('flash')) { |
|
835 | +if (!function_exists('flash')) { |
|
836 | 836 | /** |
837 | 837 | * Fournisseur d'acces rapide a la classe PHP Flash |
838 | 838 | * |
@@ -864,7 +864,7 @@ discard block |
||
864 | 864 | }*/ |
865 | 865 | } |
866 | 866 | |
867 | -if (! function_exists('geo_ip')) { |
|
867 | +if (!function_exists('geo_ip')) { |
|
868 | 868 | /** |
869 | 869 | * Recuperation des coordonnees (pays, ville, etc) d'un utilisateur en fonction de son ip |
870 | 870 | */ |
@@ -874,7 +874,7 @@ discard block |
||
874 | 874 | } |
875 | 875 | } |
876 | 876 | |
877 | -if (! function_exists('to_stream')) { |
|
877 | +if (!function_exists('to_stream')) { |
|
878 | 878 | /** |
879 | 879 | * Créez un nouveau flux basé sur le type d'entrée. |
880 | 880 | * |
@@ -897,7 +897,7 @@ discard block |
||
897 | 897 | } |
898 | 898 | } |
899 | 899 | |
900 | -if (! function_exists('value')) { |
|
900 | +if (!function_exists('value')) { |
|
901 | 901 | /** |
902 | 902 | * Renvoie la valeur par défaut de la valeur donnée. |
903 | 903 | */ |
@@ -907,7 +907,7 @@ discard block |
||
907 | 907 | } |
908 | 908 | } |
909 | 909 | |
910 | -if (! function_exists('collect')) { |
|
910 | +if (!function_exists('collect')) { |
|
911 | 911 | /** |
912 | 912 | * Créez une collection à partir de la valeur donnée. |
913 | 913 | */ |
@@ -917,7 +917,7 @@ discard block |
||
917 | 917 | } |
918 | 918 | } |
919 | 919 | |
920 | -if (! function_exists('with')) { |
|
920 | +if (!function_exists('with')) { |
|
921 | 921 | /** |
922 | 922 | * Renvoie la valeur donnée, éventuellement transmise via le rappel donné. |
923 | 923 | * |
@@ -929,7 +929,7 @@ discard block |
||
929 | 929 | } |
930 | 930 | } |
931 | 931 | |
932 | -if (! function_exists('tap')) { |
|
932 | +if (!function_exists('tap')) { |
|
933 | 933 | /** |
934 | 934 | * Appelez la Closure donnée avec cette instance puis renvoyez l'instance. |
935 | 935 | */ |
@@ -939,7 +939,7 @@ discard block |
||
939 | 939 | } |
940 | 940 | } |
941 | 941 | |
942 | -if (! function_exists('last')) { |
|
942 | +if (!function_exists('last')) { |
|
943 | 943 | /** |
944 | 944 | * Recupere le dernier element d'un tableau |
945 | 945 | */ |
@@ -949,7 +949,7 @@ discard block |
||
949 | 949 | } |
950 | 950 | } |
951 | 951 | |
952 | -if (! function_exists('invade')) { |
|
952 | +if (!function_exists('invade')) { |
|
953 | 953 | /** |
954 | 954 | * Cette classe offre une fonction d'invasion qui vous permettra de lire / écrire des propriétés privées d'un objet. |
955 | 955 | * Il vous permettra également de définir, obtenir et appeler des méthodes privées. |