@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | </span> |
43 | 43 | |
44 | 44 | <?php foreach ($collectors as $c) : ?> |
45 | - <?php if (! $c['isEmpty'] && ($c['hasTabContent'] || $c['hasLabel'])) : ?> |
|
45 | + <?php if (!$c['isEmpty'] && ($c['hasTabContent'] || $c['hasLabel'])) : ?> |
|
46 | 46 | <span class="blitzphp-label"> |
47 | 47 | <a href="javascript: void(0)" data-tab="blitzphp-<?= $c['titleSafe'] ?>"> |
48 | 48 | <img src="<?= $c['icon'] ?>"> |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | <!-- Collector-provided Tabs --> |
104 | 104 | <?php foreach ($collectors as $c) : ?> |
105 | - <?php if (! $c['isEmpty']) : ?> |
|
105 | + <?php if (!$c['isEmpty']) : ?> |
|
106 | 106 | <?php if ($c['hasTabContent']) : ?> |
107 | 107 | <div id="blitzphp-<?= $c['titleSafe'] ?>" class="tab"> |
108 | 108 | <h2><?= $c['title'] ?> <span><?= $c['titleDetails'] ?></span></h2> |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | </a> |
150 | 150 | |
151 | 151 | <?php if (isset($vars['session'])) : ?> |
152 | - <?php if (! empty($vars['session'])) : ?> |
|
152 | + <?php if (!empty($vars['session'])) : ?> |
|
153 | 153 | <table id="session_table"> |
154 | 154 | <tbody> |
155 | 155 | <?php foreach ($vars['session'] as $key => $value) : ?> |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $this->config = $config ?? (object) config('toolbar'); |
67 | 67 | |
68 | 68 | foreach ($this->config->collectors as $collector) { |
69 | - if (! class_exists($collector)) { |
|
69 | + if (!class_exists($collector)) { |
|
70 | 70 | logger()->critical( |
71 | 71 | 'Toolbar collector does not exist (' . $collector . ').' |
72 | 72 | . ' Please check $collectors in the app/Config/toolbar.php file.' |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $data['vars']['varData'][esc($heading)] = $varData; |
133 | 133 | } |
134 | 134 | |
135 | - if (! empty($_SESSION)) { |
|
135 | + if (!empty($_SESSION)) { |
|
136 | 136 | foreach ($_SESSION as $key => $value) { |
137 | 137 | // Remplacez les données binaires par une chaîne pour éviter l'échec de json_encode. |
138 | 138 | if (is_string($value) && preg_match('~[^\x20-\x7E\t\r\n]~', $value)) { |
@@ -205,8 +205,8 @@ discard block |
||
205 | 205 | $output = ''; |
206 | 206 | |
207 | 207 | foreach ($rows as $row) { |
208 | - $hasChildren = isset($row['children']) && ! empty($row['children']); |
|
209 | - $isQuery = isset($row['query']) && ! empty($row['query']); |
|
208 | + $hasChildren = isset($row['children']) && !empty($row['children']); |
|
209 | + $isQuery = isset($row['query']) && !empty($row['query']); |
|
210 | 210 | |
211 | 211 | // Ouvrir la chronologie du contrôleur par défaut |
212 | 212 | $open = $row['name'] === 'Controller'; |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | |
272 | 272 | // Le collecter |
273 | 273 | foreach ($collectors as $collector) { |
274 | - if (! $collector['hasTimelineData']) { |
|
274 | + if (!$collector['hasTimelineData']) { |
|
275 | 275 | continue; |
276 | 276 | } |
277 | 277 | |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | array_multisort(...$sortArray); |
289 | 289 | |
290 | 290 | // Ajouter une heure de fin à chaque élément |
291 | - array_walk($data, static function (&$row) { |
|
291 | + array_walk($data, static function(&$row) { |
|
292 | 292 | $row['end'] = $row['start'] + $row['duration']; |
293 | 293 | }); |
294 | 294 | |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | $element = array_shift($elements); |
308 | 308 | |
309 | 309 | // Si nous avons des enfants derrière nous, récupérez-les et attachez-les-nous |
310 | - while (! empty($elements) && $elements[array_key_first($elements)]['end'] <= $element['end']) { |
|
310 | + while (!empty($elements) && $elements[array_key_first($elements)]['end'] <= $element['end']) { |
|
311 | 311 | $element['children'][] = array_shift($elements); |
312 | 312 | } |
313 | 313 | |
@@ -331,14 +331,14 @@ discard block |
||
331 | 331 | */ |
332 | 332 | protected function collectVarData(): array |
333 | 333 | { |
334 | - if (! ($this->config->collectVarData ?? true)) { |
|
334 | + if (!($this->config->collectVarData ?? true)) { |
|
335 | 335 | return []; |
336 | 336 | } |
337 | 337 | |
338 | 338 | $data = []; |
339 | 339 | |
340 | 340 | foreach ($this->collectors as $collector) { |
341 | - if (! $collector->hasVarData()) { |
|
341 | + if (!$collector->hasVarData()) { |
|
342 | 342 | continue; |
343 | 343 | } |
344 | 344 | |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | } |
373 | 373 | |
374 | 374 | // Si on a desactiver le debogage ou l'affichage de la debugbar, on s'arrete |
375 | - if (! BLITZ_DEBUG || ! $this->config->show_debugbar) { |
|
375 | + if (!BLITZ_DEBUG || !$this->config->show_debugbar) { |
|
376 | 376 | return $response; |
377 | 377 | } |
378 | 378 | |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | // Mise à jour vers microtime() pour que nous puissions obtenir l'historique |
388 | 388 | $time = sprintf('%.6f', Date::now()->format('U.u')); |
389 | 389 | |
390 | - if (! is_dir($this->debugPath)) { |
|
390 | + if (!is_dir($this->debugPath)) { |
|
391 | 391 | mkdir($this->debugPath, 0777); |
392 | 392 | } |
393 | 393 |