@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | // Enregistrer les variables actuelles |
| 127 | 127 | $renderVars = $this->renderVars; |
| 128 | 128 | |
| 129 | - $output = (function (): string { |
|
| 129 | + $output = (function(): string { |
|
| 130 | 130 | extract($this->tempData); |
| 131 | 131 | ob_start(); |
| 132 | 132 | include $this->renderVars['file']; |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | |
| 148 | 148 | $this->logPerformance($this->renderVars['start'], microtime(true), $this->renderVars['view']); |
| 149 | 149 | |
| 150 | - if (($this->debug && (! isset($options['debug']) || $options['debug'] === true))) { |
|
| 150 | + if (($this->debug && (!isset($options['debug']) || $options['debug'] === true))) { |
|
| 151 | 151 | if (in_array(ViewsCollector::class, config('toolbar.collectors'), true)) { |
| 152 | 152 | // Nettoyer nos noms de chemins pour les rendre un peu plus propres |
| 153 | 153 | $this->renderVars['file'] = clean_path($this->renderVars['file']); |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | $saveData ??= $this->saveData; |
| 182 | 182 | $this->prepareTemplateData($saveData); |
| 183 | 183 | |
| 184 | - $output = (function (string $view): string { |
|
| 184 | + $output = (function(string $view): string { |
|
| 185 | 185 | extract($this->tempData); |
| 186 | 186 | ob_start(); |
| 187 | 187 | eval('?>' . $view); |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | $section = array_pop($this->sectionStack); |
| 314 | 314 | |
| 315 | 315 | // Assurez-vous qu'un tableau existe afin que nous puissions stocker plusieurs entrées pour cela. |
| 316 | - if (! array_key_exists($section, $this->sections)) { |
|
| 316 | + if (!array_key_exists($section, $this->sections)) { |
|
| 317 | 317 | $this->sections[$section] = []; |
| 318 | 318 | } |
| 319 | 319 | |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | */ |
| 350 | 350 | public function show(string $sectionName, bool $preserve = false) |
| 351 | 351 | { |
| 352 | - if (! isset($this->sections[$sectionName])) { |
|
| 352 | + if (!isset($this->sections[$sectionName])) { |
|
| 353 | 353 | echo ''; |
| 354 | 354 | |
| 355 | 355 | return; |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | * |
| 411 | 411 | * @param mixed $saveData |
| 412 | 412 | */ |
| 413 | - public function include(string $view, ?array $data = [], ?array $options = null, $saveData = true): string |
|
| 413 | + public function include(string $view, ?array $data = [], ?array $options = null, $saveData = true) : string |
|
| 414 | 414 | { |
| 415 | 415 | return $this->insert($view, $data, $options, $saveData); |
| 416 | 416 | } |
@@ -510,7 +510,7 @@ discard block |
||
| 510 | 510 | public function addLibCss(string ...$src): self |
| 511 | 511 | { |
| 512 | 512 | foreach ($src as $var) { |
| 513 | - if (! in_array($var, $this->_lib_styles, true)) { |
|
| 513 | + if (!in_array($var, $this->_lib_styles, true)) { |
|
| 514 | 514 | $this->_lib_styles[] = $var; |
| 515 | 515 | } |
| 516 | 516 | } |
@@ -524,7 +524,7 @@ discard block |
||
| 524 | 524 | public function addCss(string ...$src): self |
| 525 | 525 | { |
| 526 | 526 | foreach ($src as $var) { |
| 527 | - if (! in_array($var, $this->_styles, true)) { |
|
| 527 | + if (!in_array($var, $this->_styles, true)) { |
|
| 528 | 528 | $this->_styles[] = $var; |
| 529 | 529 | } |
| 530 | 530 | } |
@@ -553,10 +553,10 @@ discard block |
||
| 553 | 553 | ); |
| 554 | 554 | } |
| 555 | 555 | |
| 556 | - if (! empty($lib_styles)) { |
|
| 556 | + if (!empty($lib_styles)) { |
|
| 557 | 557 | lib_styles(array_unique($lib_styles)); |
| 558 | 558 | } |
| 559 | - if (! empty($styles)) { |
|
| 559 | + if (!empty($styles)) { |
|
| 560 | 560 | styles(array_unique($styles)); |
| 561 | 561 | } |
| 562 | 562 | |
@@ -569,7 +569,7 @@ discard block |
||
| 569 | 569 | public function addLibJs(string ...$src): self |
| 570 | 570 | { |
| 571 | 571 | foreach ($src as $var) { |
| 572 | - if (! in_array($var, $this->_lib_scripts, true)) { |
|
| 572 | + if (!in_array($var, $this->_lib_scripts, true)) { |
|
| 573 | 573 | $this->_lib_scripts[] = $var; |
| 574 | 574 | } |
| 575 | 575 | } |
@@ -583,7 +583,7 @@ discard block |
||
| 583 | 583 | public function addJs(string ...$src): self |
| 584 | 584 | { |
| 585 | 585 | foreach ($src as $var) { |
| 586 | - if (! in_array($var, $this->_scripts, true)) { |
|
| 586 | + if (!in_array($var, $this->_scripts, true)) { |
|
| 587 | 587 | $this->_scripts[] = $var; |
| 588 | 588 | } |
| 589 | 589 | } |
@@ -612,10 +612,10 @@ discard block |
||
| 612 | 612 | ); |
| 613 | 613 | } |
| 614 | 614 | |
| 615 | - if (! empty($lib_scripts)) { |
|
| 615 | + if (!empty($lib_scripts)) { |
|
| 616 | 616 | lib_scripts(array_unique($lib_scripts)); |
| 617 | 617 | } |
| 618 | - if (! empty($scripts)) { |
|
| 618 | + if (!empty($scripts)) { |
|
| 619 | 619 | scripts(array_unique($scripts)); |
| 620 | 620 | } |
| 621 | 621 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | { |
| 48 | 48 | $force = array_key_exists('force', $params) || $this->option('force'); |
| 49 | 49 | |
| 50 | - if (! $force && ! $this->confirm('Êtes-vous sûr de vouloir supprimer les logs?')) { |
|
| 50 | + if (!$force && !$this->confirm('Êtes-vous sûr de vouloir supprimer les logs?')) { |
|
| 51 | 51 | // @codeCoverageIgnoreStart |
| 52 | 52 | $this->fail('Suppression des logs interrompue.'); |
| 53 | 53 | $this->fail('Si vous le souhaitez, utilisez l\'option "-force" pour forcer la suppression de tous les fichiers de log.'); |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | helper('filesystem'); |
| 61 | 61 | |
| 62 | - if (! delete_files(STORAGE_PATH . 'logs', false, true)) { |
|
| 62 | + if (!delete_files(STORAGE_PATH . 'logs', false, true)) { |
|
| 63 | 63 | // @codeCoverageIgnoreStart |
| 64 | 64 | $this->error('Erreur lors de la suppression des fichiers de logs.')->eol(); |
| 65 | 65 | |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | { |
| 41 | 41 | helper('filesystem'); |
| 42 | 42 | |
| 43 | - if (! delete_files(FRAMEWORK_STORAGE_PATH . 'debugbar')) { |
|
| 43 | + if (!delete_files(FRAMEWORK_STORAGE_PATH . 'debugbar')) { |
|
| 44 | 44 | // @codeCoverageIgnoreStart |
| 45 | 45 | $this->error('Erreur lors de la suppression des fichiers de la debugbar.')->eol(); |
| 46 | 46 | |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | |
| 25 | 25 | public static function setUpBeforeClass(): void |
| 26 | 26 | { |
| 27 | - if (! is_dir($dirname = pathinfo(static::$ou, PATHINFO_DIRNAME))) { |
|
| 27 | + if (!is_dir($dirname = pathinfo(static::$ou, PATHINFO_DIRNAME))) { |
|
| 28 | 28 | mkdir($dirname, 0o777, true); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | 'Sodium' => extension_loaded('sodium') && version_compare(SODIUM_LIBRARY_VERSION, '1.0.14', '>='), |
| 83 | 83 | ]; |
| 84 | 84 | |
| 85 | - if (! in_array($this->driver, $this->drivers, true) || (array_key_exists($this->driver, $this->handlers) && ! $this->handlers[$this->driver])) { |
|
| 85 | + if (!in_array($this->driver, $this->drivers, true) || (array_key_exists($this->driver, $this->handlers) && !$this->handlers[$this->driver])) { |
|
| 86 | 86 | throw EncryptionException::noHandlerAvailable($this->driver); |
| 87 | 87 | } |
| 88 | 88 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | throw EncryptionException::noDriverRequested(); |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - if (! in_array($this->driver, $this->drivers, true)) { |
|
| 123 | + if (!in_array($this->driver, $this->drivers, true)) { |
|
| 124 | 124 | throw EncryptionException::unKnownHandler($this->driver); |
| 125 | 125 | } |
| 126 | 126 | |
@@ -125,7 +125,7 @@ |
||
| 125 | 125 | $data = self::substr($data, $hmacLength); |
| 126 | 126 | $hmacCalc = \hash_hmac($this->digest, $data, $authKey, $this->rawData); |
| 127 | 127 | |
| 128 | - if (! hash_equals($hmacKey, $hmacCalc)) { |
|
| 128 | + if (!hash_equals($hmacKey, $hmacCalc)) { |
|
| 129 | 129 | throw EncryptionException::authenticationFailed(); |
| 130 | 130 | } |
| 131 | 131 | |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | |
| 158 | 158 | foreach ($options as $key => $value) { |
| 159 | 159 | $key = preg_replace('/^\-\-/', '', $key); |
| 160 | - if (! isset($options[$key])) { |
|
| 160 | + if (!isset($options[$key])) { |
|
| 161 | 161 | $options[$key] = $value; |
| 162 | 162 | } |
| 163 | 163 | } |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | foreach ($files as $file) { |
| 198 | 198 | $className = $locator->findQualifiedNameFromPath($file); |
| 199 | 199 | |
| 200 | - if ($className === false || ! class_exists($className)) { |
|
| 200 | + if ($className === false || !class_exists($className)) { |
|
| 201 | 201 | continue; |
| 202 | 202 | } |
| 203 | 203 | |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | $class = new ReflectionClass($className); |
| 224 | 224 | $logger = $logger ?: Services::logger(); |
| 225 | 225 | |
| 226 | - if (! $class->isInstantiable() || ! $class->isSubclassOf(Command::class)) { |
|
| 226 | + if (!$class->isInstantiable() || !$class->isSubclassOf(Command::class)) { |
|
| 227 | 227 | throw CLIException::invalidCommand($className); |
| 228 | 228 | } |
| 229 | 229 | |
@@ -250,13 +250,13 @@ discard block |
||
| 250 | 250 | $value = (array) $value; |
| 251 | 251 | |
| 252 | 252 | $description = $value[0]; |
| 253 | - if (! is_string($description)) { |
|
| 253 | + if (!is_string($description)) { |
|
| 254 | 254 | continue; |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | $default = $value[1] ?? null; |
| 258 | 258 | $filter = $value[2] ?? null; |
| 259 | - if ($filter !== null && ! is_callable($filter)) { |
|
| 259 | + if ($filter !== null && !is_callable($filter)) { |
|
| 260 | 260 | $filter = null; |
| 261 | 261 | } |
| 262 | 262 | |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | $value = (array) $value; |
| 269 | 269 | |
| 270 | 270 | $description = $value[0]; |
| 271 | - if (! is_string($description)) { |
|
| 271 | + if (!is_string($description)) { |
|
| 272 | 272 | continue; |
| 273 | 273 | } |
| 274 | 274 | |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | $console = $this; |
| 281 | - $action = function (?array $arguments = [], ?array $options = [], ?bool $suppress = null) use ($instance, $command, $console) { |
|
| 281 | + $action = function(?array $arguments = [], ?array $options = [], ?bool $suppress = null) use ($instance, $command, $console) { |
|
| 282 | 282 | foreach ($instance->required as $package) { |
| 283 | 283 | $package = explode(':', $package); |
| 284 | 284 | $version = $package[1] ?? null; |
@@ -287,9 +287,9 @@ discard block |
||
| 287 | 287 | /** @var \Ahc\Cli\IO\Interactor $io */ |
| 288 | 288 | $io = $this->io(); |
| 289 | 289 | |
| 290 | - if (! InstalledVersions::isInstalled($package)) { |
|
| 290 | + if (!InstalledVersions::isInstalled($package)) { |
|
| 291 | 291 | $io->info('Cette commande nécessite le package "' . $package . '" mais vous ne l\'avez pas', true); |
| 292 | - if (! $io->confirm('Voulez-vous l\'installer maintenant ?')) { |
|
| 292 | + if (!$io->confirm('Voulez-vous l\'installer maintenant ?')) { |
|
| 293 | 293 | return; |
| 294 | 294 | } |
| 295 | 295 | |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | $suppress = $suppress ?: $console->suppress; |
| 308 | - if (! $suppress) { |
|
| 308 | + if (!$suppress) { |
|
| 309 | 309 | $console->start($instance->service); |
| 310 | 310 | } |
| 311 | 311 | |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | |
| 321 | 321 | $result = $instance->setOptions($options)->setArguments($arguments)->execute($parameters); |
| 322 | 322 | |
| 323 | - if (! $suppress) { |
|
| 323 | + if (!$suppress) { |
|
| 324 | 324 | $console->end(); |
| 325 | 325 | } |
| 326 | 326 | |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | |
| 336 | 336 | private function registerException(Logger $logger) |
| 337 | 337 | { |
| 338 | - $this->onException(static function (Throwable $e, int $exitCode) use ($logger) { |
|
| 338 | + $this->onException(static function(Throwable $e, int $exitCode) use ($logger) { |
|
| 339 | 339 | $logger->error((string) $e, ['exitCode' => $exitCode, 'klinge' => true]); |
| 340 | 340 | |
| 341 | 341 | throw new CLIException($e->getMessage(), $exitCode, $e); |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | use BlitzPHP\Utilities\String\Inflector; |
| 13 | 13 | use BlitzPHP\Utilities\String\Text; |
| 14 | 14 | |
| 15 | -if (! function_exists('camelize')) { |
|
| 15 | +if (!function_exists('camelize')) { |
|
| 16 | 16 | /** |
| 17 | 17 | * Camelize |
| 18 | 18 | * |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | -if (! function_exists('classify')) { |
|
| 29 | +if (!function_exists('classify')) { |
|
| 30 | 30 | /** |
| 31 | 31 | * Returns model class name ("Person" for the database table "people".) for given database table. |
| 32 | 32 | * |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | -if (! function_exists('dasherize')) { |
|
| 43 | +if (!function_exists('dasherize')) { |
|
| 44 | 44 | /** |
| 45 | 45 | * Returns the input CamelCasedString as an dashed-string. |
| 46 | 46 | * |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | -if (! function_exists('delimit')) { |
|
| 59 | +if (!function_exists('delimit')) { |
|
| 60 | 60 | /** |
| 61 | 61 | * Expects a CamelCasedInputString, and produces a lower_case_delimited_string |
| 62 | 62 | * |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | -if (! function_exists('humanize')) { |
|
| 74 | +if (!function_exists('humanize')) { |
|
| 75 | 75 | /** |
| 76 | 76 | * Humanize |
| 77 | 77 | * |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | -if (! function_exists('plural')) { |
|
| 89 | +if (!function_exists('plural')) { |
|
| 90 | 90 | /** |
| 91 | 91 | * Plural |
| 92 | 92 | * |
@@ -94,30 +94,30 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | function plural(string $str): string |
| 96 | 96 | { |
| 97 | - if (! is_countable($str)) { |
|
| 97 | + if (!is_countable($str)) { |
|
| 98 | 98 | return $str; |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | $plural_rules = [ |
| 102 | - '/(quiz)$/' => '\1zes', // quizzes |
|
| 103 | - '/^(ox)$/' => '\1\2en', // ox |
|
| 104 | - '/([m|l])ouse$/' => '\1ice', // mouse, louse |
|
| 105 | - '/(matr|vert|ind)ix|ex$/' => '\1ices', // matrix, vertex, index |
|
| 106 | - '/(x|ch|ss|sh)$/' => '\1es', // search, switch, fix, box, process, address |
|
| 107 | - '/([^aeiouy]|qu)y$/' => '\1ies', // query, ability, agency |
|
| 108 | - '/(hive)$/' => '\1s', // archive, hive |
|
| 109 | - '/(?:([^f])fe|([lr])f)$/' => '\1\2ves', // half, safe, wife |
|
| 110 | - '/sis$/' => 'ses', // basis, diagnosis |
|
| 111 | - '/([ti])um$/' => '\1a', // datum, medium |
|
| 112 | - '/(p)erson$/' => '\1eople', // person, salesperson |
|
| 113 | - '/(m)an$/' => '\1en', // man, woman, spokesman |
|
| 114 | - '/(c)hild$/' => '\1hildren', // child |
|
| 115 | - '/(buffal|tomat)o$/' => '\1\2oes', // buffalo, tomato |
|
| 116 | - '/(bu|campu)s$/' => '\1\2ses', // bus, campus |
|
| 117 | - '/(alias|status|virus)$/' => '\1es', // alias |
|
| 118 | - '/(octop)us$/' => '\1i', // octopus |
|
| 119 | - '/(ax|cris|test)is$/' => '\1es', // axis, crisis |
|
| 120 | - '/s$/' => 's', // no change (compatibility) |
|
| 102 | + '/(quiz)$/' => '\1zes', // quizzes |
|
| 103 | + '/^(ox)$/' => '\1\2en', // ox |
|
| 104 | + '/([m|l])ouse$/' => '\1ice', // mouse, louse |
|
| 105 | + '/(matr|vert|ind)ix|ex$/' => '\1ices', // matrix, vertex, index |
|
| 106 | + '/(x|ch|ss|sh)$/' => '\1es', // search, switch, fix, box, process, address |
|
| 107 | + '/([^aeiouy]|qu)y$/' => '\1ies', // query, ability, agency |
|
| 108 | + '/(hive)$/' => '\1s', // archive, hive |
|
| 109 | + '/(?:([^f])fe|([lr])f)$/' => '\1\2ves', // half, safe, wife |
|
| 110 | + '/sis$/' => 'ses', // basis, diagnosis |
|
| 111 | + '/([ti])um$/' => '\1a', // datum, medium |
|
| 112 | + '/(p)erson$/' => '\1eople', // person, salesperson |
|
| 113 | + '/(m)an$/' => '\1en', // man, woman, spokesman |
|
| 114 | + '/(c)hild$/' => '\1hildren', // child |
|
| 115 | + '/(buffal|tomat)o$/' => '\1\2oes', // buffalo, tomato |
|
| 116 | + '/(bu|campu)s$/' => '\1\2ses', // bus, campus |
|
| 117 | + '/(alias|status|virus)$/' => '\1es', // alias |
|
| 118 | + '/(octop)us$/' => '\1i', // octopus |
|
| 119 | + '/(ax|cris|test)is$/' => '\1es', // axis, crisis |
|
| 120 | + '/s$/' => 's', // no change (compatibility) |
|
| 121 | 121 | '/$/' => 's', |
| 122 | 122 | ]; |
| 123 | 123 | |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | } |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | -if (! function_exists('pluralize')) { |
|
| 137 | +if (!function_exists('pluralize')) { |
|
| 138 | 138 | /** |
| 139 | 139 | * Return $word in plural form. |
| 140 | 140 | * |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | } |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | -if (! function_exists('singular')) { |
|
| 151 | +if (!function_exists('singular')) { |
|
| 152 | 152 | /** |
| 153 | 153 | * Singular |
| 154 | 154 | * |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | */ |
| 157 | 157 | function singular(string $str): string |
| 158 | 158 | { |
| 159 | - if (! is_countable($str)) { |
|
| 159 | + if (!is_countable($str)) { |
|
| 160 | 160 | return $str; |
| 161 | 161 | } |
| 162 | 162 | |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | } |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | -if (! function_exists('singularize')) { |
|
| 207 | +if (!function_exists('singularize')) { |
|
| 208 | 208 | /** |
| 209 | 209 | * Return $word in singular form. |
| 210 | 210 | * |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | } |
| 219 | 219 | } |
| 220 | 220 | |
| 221 | -if (! function_exists('tableize')) { |
|
| 221 | +if (!function_exists('tableize')) { |
|
| 222 | 222 | /** |
| 223 | 223 | * Returns corresponding table name for given model $className. ("people" for the model class "Person"). |
| 224 | 224 | * |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | } |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | -if (! function_exists('underscore')) { |
|
| 235 | +if (!function_exists('underscore')) { |
|
| 236 | 236 | /** |
| 237 | 237 | * Underscore |
| 238 | 238 | * |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | } |
| 247 | 247 | } |
| 248 | 248 | |
| 249 | -if (! function_exists('variable')) { |
|
| 249 | +if (!function_exists('variable')) { |
|
| 250 | 250 | /** |
| 251 | 251 | * Returns camelBacked version of an underscored string. |
| 252 | 252 | * |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | } |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | -if (! function_exists('counted')) { |
|
| 263 | +if (!function_exists('counted')) { |
|
| 264 | 264 | /** |
| 265 | 265 | * Counted |
| 266 | 266 | * |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | } |
| 279 | 279 | } |
| 280 | 280 | |
| 281 | -if (! function_exists('pascalize')) { |
|
| 281 | +if (!function_exists('pascalize')) { |
|
| 282 | 282 | /** |
| 283 | 283 | * Pascalize |
| 284 | 284 | * |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | } |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | -if (! function_exists('is_pluralizable')) { |
|
| 297 | +if (!function_exists('is_pluralizable')) { |
|
| 298 | 298 | /** |
| 299 | 299 | * Checks if the given word has a plural version. |
| 300 | 300 | * |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | */ |
| 303 | 303 | function is_pluralizable(string $word): bool |
| 304 | 304 | { |
| 305 | - return ! in_array( |
|
| 305 | + return !in_array( |
|
| 306 | 306 | strtolower($word), |
| 307 | 307 | [ |
| 308 | 308 | 'advice', |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | } |
| 378 | 378 | } |
| 379 | 379 | |
| 380 | -if (! function_exists('ordinal')) { |
|
| 380 | +if (!function_exists('ordinal')) { |
|
| 381 | 381 | /** |
| 382 | 382 | * Returns the suffix that should be added to a |
| 383 | 383 | * number to denote the position in an ordered |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | } |
| 405 | 405 | } |
| 406 | 406 | |
| 407 | -if (! function_exists('ordinalize')) { |
|
| 407 | +if (!function_exists('ordinalize')) { |
|
| 408 | 408 | /** |
| 409 | 409 | * Turns a number into an ordinal string used |
| 410 | 410 | * to denote the position in an ordered sequence |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | public function __construct(bool $debug = false) |
| 33 | 33 | { |
| 34 | 34 | $this->mailer = new Mailer(); |
| 35 | - $this->mailer->Debugoutput = static function ($str, $level) { |
|
| 35 | + $this->mailer->Debugoutput = static function($str, $level) { |
|
| 36 | 36 | Services::logger()->info('[Mail][' . $level . ']: ' . $str); |
| 37 | 37 | }; |
| 38 | 38 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | public function init(array $config): static |
| 46 | 46 | { |
| 47 | - if (! empty($config['username']) && ! empty($config['password'])) { |
|
| 47 | + if (!empty($config['username']) && !empty($config['password'])) { |
|
| 48 | 48 | $this->mailer->SMTPAuth = true; |
| 49 | 49 | } |
| 50 | 50 | |