From f92e9f37131b75ee35f86344f5f4879cb4b4a10d Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Mon, 30 Dec 2024 19:34:17 -0300 Subject: [PATCH 1/3] Update return type --- tests/Support/WithRouteActions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Support/WithRouteActions.php b/tests/Support/WithRouteActions.php index 2bfcf94..671811d 100644 --- a/tests/Support/WithRouteActions.php +++ b/tests/Support/WithRouteActions.php @@ -34,7 +34,7 @@ public function index(string ...$params) : string * @param int $int * @param string $string * - * @return array + * @return array */ public function noStrictTypes(bool $bool, float $float, int $int, string $string) : array { From ba25331afe0966e3b7abfb7af1ec5aeab0414c3d Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Sun, 5 Jan 2025 20:35:46 -0300 Subject: [PATCH 2/3] Upgrade debug library --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 663387c..f2eb10e 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ ], "require": { "php": ">=8.3", - "aplus/debug": "^4.0", + "aplus/debug": "^4.3", "aplus/http": "^6.0", "aplus/language": "^4.0" }, From b774a1bf005e207f9824e044c168b0c0271b44b0 Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Sun, 5 Jan 2025 20:36:31 -0300 Subject: [PATCH 3/3] Show times as milliseconds --- src/Debug/RoutingCollector.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Debug/RoutingCollector.php b/src/Debug/RoutingCollector.php index 3b5bd55..70e7741 100644 --- a/src/Debug/RoutingCollector.php +++ b/src/Debug/RoutingCollector.php @@ -11,6 +11,7 @@ use Closure; use Framework\Debug\Collector; +use Framework\Debug\Debugger; use Framework\Routing\RouteCollection; use Framework\Routing\Router; @@ -135,8 +136,8 @@ protected function renderMatchedRoute() : string Action Name Has Options - Time to Match - Runtime + Time to Match + Runtime @@ -159,13 +160,13 @@ protected function renderMatchedRoute() : string getData() as $data) { if ($data['type'] === 'match') { - echo \round($data['end'] - $data['start'], 6); + echo Debugger::roundSecondsToMilliseconds($data['end'] - $data['start']); } } ?> getData() as $data) { if ($data['type'] === 'run') { - echo \round($data['end'] - $data['start'], 6); + echo Debugger::roundSecondsToMilliseconds($data['end'] - $data['start']); } } ?> @@ -214,8 +215,8 @@ protected function renderRouteCollectionTime(RouteCollection $collection) : stri foreach ($this->getData() as $data) { if ($data['type'] === 'serve' && $data['collectionId'] === \spl_object_id($collection)) { $contents = '

Time to Serve: ' - . \round($data['end'] - $data['start'], 6) - . '

'; + . Debugger::roundSecondsToMilliseconds($data['end'] - $data['start']) + . ' ms

'; break; } } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy