|
18 | 18 | use CodeIgniter\Format\JSONFormatter;
|
19 | 19 | use CodeIgniter\Format\XMLFormatter;
|
20 | 20 | use CodeIgniter\HTTP\DownloadResponse;
|
| 21 | +use CodeIgniter\HTTP\IncomingRequest; |
21 | 22 | use CodeIgniter\HTTP\RequestInterface;
|
| 23 | +use CodeIgniter\HTTP\Response; |
22 | 24 | use CodeIgniter\HTTP\ResponseInterface;
|
23 | 25 | use Config\Services;
|
24 | 26 | use Config\Toolbar as ToolbarConfig;
|
@@ -84,6 +86,11 @@ public function __construct(ToolbarConfig $config)
|
84 | 86 | */
|
85 | 87 | public function run(float $startTime, float $totalTime, RequestInterface $request, ResponseInterface $response): string
|
86 | 88 | {
|
| 89 | + /** |
| 90 | + * @var IncomingRequest $request |
| 91 | + * @var Response $response |
| 92 | + */ |
| 93 | + |
87 | 94 | // Data items used within the view.
|
88 | 95 | $data['url'] = current_url();
|
89 | 96 | $data['method'] = $request->getMethod(true);
|
@@ -295,6 +302,11 @@ protected function roundTo(float $number, int $increments = 5): float
|
295 | 302 | */
|
296 | 303 | public function prepare(RequestInterface $request = null, ResponseInterface $response = null)
|
297 | 304 | {
|
| 305 | + /** |
| 306 | + * @var IncomingRequest $request |
| 307 | + * @var Response $response |
| 308 | + */ |
| 309 | + |
298 | 310 | if (CI_DEBUG && ! is_cli())
|
299 | 311 | {
|
300 | 312 | global $app;
|
@@ -437,8 +449,8 @@ protected function format(string $data, string $format = 'html'): string
|
437 | 449 | {
|
438 | 450 | $history = new History();
|
439 | 451 | $history->setFiles(
|
440 |
| - Services::request()->getGet('debugbar_time'), |
441 |
| - $this->config->maxHistory |
| 452 | + (int) Services::request()->getGet('debugbar_time'), |
| 453 | + $this->config->maxHistory |
442 | 454 | );
|
443 | 455 |
|
444 | 456 | $data['collectors'][] = $history->getAsArray();
|
|
0 commit comments