@@ -115,7 +115,7 @@ |
||
115 | 115 | |
116 | 116 | private function removeDevPackages(): void |
117 | 117 | { |
118 | - if (! defined('VENDOR_PATH')) { |
|
118 | + if (!defined('VENDOR_PATH')) { |
|
119 | 119 | return; |
120 | 120 | } |
121 | 121 |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | public static function locator(bool $shared = true): LocatorInterface |
282 | 282 | { |
283 | 283 | if ($shared) { |
284 | - if (! isset(static::$instances[Locator::class])) { |
|
284 | + if (!isset(static::$instances[Locator::class])) { |
|
285 | 285 | $locator = new Locator(static::autoloader()); |
286 | 286 | if (true === config('optimize.locator_cache_enabled', false)) { |
287 | 287 | static::$instances[Locator::class] = new LocatorCached($locator, new FileVarExportHandler()); |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | |
619 | 619 | protected static function cacheServices(): void |
620 | 620 | { |
621 | - if (! static::$discovered) { |
|
621 | + if (!static::$discovered) { |
|
622 | 622 | $locator = static::locator(); |
623 | 623 | $files = $locator->search('Config/Services'); |
624 | 624 |
@@ -25,17 +25,17 @@ |
||
25 | 25 | Kint::$display_called_from = $config->display_called_from; |
26 | 26 | Kint::$expanded = $config->expanded; |
27 | 27 | |
28 | -if (! empty($config->plugins)) { |
|
28 | +if (!empty($config->plugins)) { |
|
29 | 29 | Kint::$plugins = $config->plugins; |
30 | 30 | } |
31 | 31 | |
32 | 32 | RichRenderer::$theme = $config->rich_theme; |
33 | 33 | RichRenderer::$folder = $config->rich_folder; |
34 | 34 | |
35 | -if (! empty($config->rich_value_plugins)) { |
|
35 | +if (!empty($config->rich_value_plugins)) { |
|
36 | 36 | RichRenderer::$value_plugins = $config->rich_value_plugins; |
37 | 37 | } |
38 | -if (! empty($config->rich_tab_plugins)) { |
|
38 | +if (!empty($config->rich_tab_plugins)) { |
|
39 | 39 | RichRenderer::$tab_plugins = $config->rich_tab_plugins; |
40 | 40 | } |
41 | 41 |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | public function __construct() |
23 | 23 | { |
24 | 24 | // SimpleXML est installé par défaut, mais il est préférable de vérifier, puis de fournir une solution de repli. |
25 | - if (! extension_loaded('simplexml')) { |
|
25 | + if (!extension_loaded('simplexml')) { |
|
26 | 26 | throw FormatException::missingExtension(); |
27 | 27 | } |
28 | 28 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | /** |
67 | 67 | * Une méthode récursive pour convertir un tableau en une chaîne XML valide. |
68 | 68 | */ |
69 | - protected function arrayToXml(array $data, SimpleXMLElement &$structure, string $basenode): void |
|
69 | + protected function arrayToXml(array $data, SimpleXMLElement&$structure, string $basenode): void |
|
70 | 70 | { |
71 | 71 | foreach ($data as $key => $value) { |
72 | 72 | // change false/true en 0/1 |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | /** @var LocatorInterface */ |
39 | 39 | $loader = service('locator'); |
40 | 40 | |
41 | - if (! is_array($filenames)) { |
|
41 | + if (!is_array($filenames)) { |
|
42 | 42 | $filenames = [$filenames]; |
43 | 43 | } |
44 | 44 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | } |
83 | 83 | |
84 | 84 | // Les helpers au niveau de l'application doivent remplacer tous les autres |
85 | - if (! empty($appHelper)) { |
|
85 | + if (!empty($appHelper)) { |
|
86 | 86 | $includes[] = $appHelper; |
87 | 87 | $loaded[] = $filename; |
88 | 88 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $includes = [...$includes, ...$localIncludes]; |
92 | 92 | |
93 | 93 | // Et celui par défaut du système doit être ajouté en dernier. |
94 | - if (! empty($systemHelper)) { |
|
94 | + if (!empty($systemHelper)) { |
|
95 | 95 | $includes[] = $systemHelper; |
96 | 96 | $loaded[] = $filename; |
97 | 97 | } |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | // Si le fichier est dans un espace de noms, nous allons simplement saisir ce fichier et ne pas en rechercher d'autres |
131 | 131 | if (str_contains($name, '\\')) { |
132 | - if (! empty($path = $loader->locateFile($name, 'schemas'))) { |
|
132 | + if (!empty($path = $loader->locateFile($name, 'schemas'))) { |
|
133 | 133 | $file = $path; |
134 | 134 | } |
135 | 135 | } else { |
@@ -147,18 +147,18 @@ discard block |
||
147 | 147 | } |
148 | 148 | |
149 | 149 | // Les schema des vendor sont prioritaire, ensuite vienne ceux de l'application |
150 | - if (! empty($vendorSchema)) { |
|
150 | + if (!empty($vendorSchema)) { |
|
151 | 151 | $file = $vendorSchema; |
152 | - } elseif (! empty($appSchema)) { |
|
152 | + } elseif (!empty($appSchema)) { |
|
153 | 153 | $file = $appSchema; |
154 | - } elseif (! empty($systemSchema)) { |
|
154 | + } elseif (!empty($systemSchema)) { |
|
155 | 155 | $file = $systemSchema; |
156 | 156 | } |
157 | 157 | } |
158 | 158 | |
159 | - $schema = ! empty($file) ? require $file : null; |
|
159 | + $schema = !empty($file) ? require $file : null; |
|
160 | 160 | |
161 | - if (empty($schema) || ! ($schema instanceof Schema)) { |
|
161 | + if (empty($schema) || !($schema instanceof Schema)) { |
|
162 | 162 | $schema = Expect::mixed(); |
163 | 163 | } |
164 | 164 | |
@@ -176,16 +176,16 @@ discard block |
||
176 | 176 | */ |
177 | 177 | public static function model(string $model, ?ConnectionInterface $connection = null) |
178 | 178 | { |
179 | - if (! class_exists($model) && ! Text::endsWith($model, 'Model')) { |
|
179 | + if (!class_exists($model) && !Text::endsWith($model, 'Model')) { |
|
180 | 180 | $model .= 'Model'; |
181 | 181 | } |
182 | 182 | |
183 | - if (! class_exists($model)) { |
|
183 | + if (!class_exists($model)) { |
|
184 | 184 | $model = str_replace(APP_NAMESPACE . '\\Models\\', '', $model); |
185 | 185 | $model = APP_NAMESPACE . '\\Models\\' . $model; |
186 | 186 | } |
187 | 187 | |
188 | - if (! class_exists($model)) { |
|
188 | + if (!class_exists($model)) { |
|
189 | 189 | throw LoadException::modelNotFound($model); |
190 | 190 | } |
191 | 191 | |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | protected static function verifyPreferApp(array $options, string $name): bool |
215 | 215 | { |
216 | 216 | // Tout element sans restriction passe |
217 | - if (! $options['preferApp']) { |
|
217 | + if (!$options['preferApp']) { |
|
218 | 218 | return true; |
219 | 219 | } |
220 | 220 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | $callback = service('request')->getQuery('callback'); |
29 | 29 | |
30 | 30 | if (empty($callback)) { |
31 | - return json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); |
|
31 | + return json_encode($data, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | // Nous n'honorons qu'un rappel jsonp qui sont des identifiants javascript valides |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | */ |
131 | 131 | public function addIf(string $key, Closure $callback): void |
132 | 132 | { |
133 | - if (! $this->has($key)) { |
|
133 | + if (!$this->has($key)) { |
|
134 | 134 | $this->add($key, $callback); |
135 | 135 | } |
136 | 136 | } |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | */ |
257 | 257 | private function discoveProviders(): void |
258 | 258 | { |
259 | - if (! self::$discovered) { |
|
259 | + if (!self::$discovered) { |
|
260 | 260 | $locator = service('locator'); |
261 | 261 | $files = array_merge( |
262 | 262 | $locator->search('Config/Providers'), |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public static function registerHttpErrors(Run $debugger, array $config): Run |
36 | 36 | { |
37 | - return $debugger->pushHandler(static function (Throwable $exception, InspectorInterface $inspector, RunInterface $run) use ($config): int { |
|
38 | - if (true === $config['log'] && ! in_array($exception->getCode(), $config['ignore_codes'], true)) { |
|
37 | + return $debugger->pushHandler(static function(Throwable $exception, InspectorInterface $inspector, RunInterface $run) use ($config): int { |
|
38 | + if (true === $config['log'] && !in_array($exception->getCode(), $config['ignore_codes'], true)) { |
|
39 | 39 | service('logger')->error($exception); |
40 | 40 | } |
41 | 41 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $debugger->pushHandler(new PlainTextHandler()); |
96 | 96 | } |
97 | 97 | |
98 | - if (! is_online()) { |
|
98 | + if (!is_online()) { |
|
99 | 99 | if (Misc::isAjaxRequest() || service('request')->isJson()) { |
100 | 100 | $debugger->pushHandler(new JsonResponseHandler()); |
101 | 101 | } else { |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | public function __construct(bool $debug = false) |
32 | 32 | { |
33 | 33 | $this->mailer = new Mailer(); |
34 | - $this->mailer->Debugoutput = static function ($str, $level): void { |
|
34 | + $this->mailer->Debugoutput = static function($str, $level): void { |
|
35 | 35 | service('logger')->info('[Mail][' . $level . ']: ' . $str); |
36 | 36 | }; |
37 | 37 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function init(array $config): static |
45 | 45 | { |
46 | - if (! empty($config['username']) && ! empty($config['password'])) { |
|
46 | + if (!empty($config['username']) && !empty($config['password'])) { |
|
47 | 47 | $this->mailer->SMTPAuth = true; |
48 | 48 | } |
49 | 49 |