Skip to content

Commit 4509466

Browse files
authored
Merge pull request #6524 from ping-yee/Toolbar-modify-variable
refactor: replace `global $app` with Services
2 parents af25fe2 + fc057af commit 4509466

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

system/Debug/Toolbar.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,6 @@ protected function roundTo(float $number, int $increments = 5): float
350350
*
351351
* @param RequestInterface $request
352352
* @param ResponseInterface $response
353-
*
354-
* @global \CodeIgniter\CodeIgniter $app
355353
*/
356354
public function prepare(?RequestInterface $request = null, ?ResponseInterface $response = null)
357355
{
@@ -360,7 +358,7 @@ public function prepare(?RequestInterface $request = null, ?ResponseInterface $r
360358
* @var Response|null $response
361359
*/
362360
if (CI_DEBUG && ! is_cli()) {
363-
global $app;
361+
$app = Services::codeigniter();
364362

365363
$request ??= Services::request();
366364
$response ??= Services::response();

0 commit comments

Comments
 (0)