Skip to content

Commit 50b3f57

Browse files
authored
refactor: import FQCNs (#9520)
1 parent 77ec9e5 commit 50b3f57

File tree

7 files changed

+43
-25
lines changed

7 files changed

+43
-25
lines changed

admin/starter/tests/_support/Libraries/ConfigReader.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22

33
namespace Tests\Support\Libraries;
44

5+
use Config\App;
6+
57
/**
68
* Class ConfigReader
79
*
810
* An extension of BaseConfig that prevents the constructor from
911
* loading external values. Used to read actual local values from
1012
* a config file.
1113
*/
12-
class ConfigReader extends \Config\App
14+
class ConfigReader extends App
1315
{
1416
public function __construct()
1517
{

preload.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
* the LICENSE file that was distributed with this source code.
1010
*/
1111

12+
use CodeIgniter\Boot;
13+
use Config\Paths;
14+
1215
/*
1316
*---------------------------------------------------------------
1417
* Sample file for Preloading
@@ -69,10 +72,10 @@ public function __construct()
6972

7073
private function loadAutoloader(): void
7174
{
72-
$paths = new Config\Paths();
75+
$paths = new Paths();
7376
require rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'Boot.php';
7477

75-
CodeIgniter\Boot::preload($paths);
78+
Boot::preload($paths);
7679
}
7780

7881
/**

public/index.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?php
22

3+
use CodeIgniter\Boot;
4+
use Config\Paths;
5+
36
/*
47
*---------------------------------------------------------------
58
* CHECK PHP VERSION
@@ -48,9 +51,9 @@
4851
require FCPATH . '../app/Config/Paths.php';
4952
// ^^^ Change this line if you move your application folder
5053

51-
$paths = new Config\Paths();
54+
$paths = new Paths();
5255

5356
// LOAD THE FRAMEWORK BOOTSTRAP FILE
5457
require $paths->systemDirectory . '/Boot.php';
5558

56-
exit(CodeIgniter\Boot::bootWeb($paths));
59+
exit(Boot::bootWeb($paths));

spark

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
* the LICENSE file that was distributed with this source code.
1111
*/
1212

13+
use CodeIgniter\Boot;
14+
use Config\Paths;
15+
1316
/*
1417
* --------------------------------------------------------------------
1518
* CODEIGNITER COMMAND-LINE TOOLS
@@ -76,9 +79,9 @@ chdir(FCPATH);
7679
require FCPATH . '../app/Config/Paths.php';
7780
// ^^^ Change this line if you move your application folder
7881

79-
$paths = new Config\Paths();
82+
$paths = new Paths();
8083

8184
// LOAD THE FRAMEWORK BOOTSTRAP FILE
8285
require $paths->systemDirectory . '/Boot.php';
8386

84-
exit(CodeIgniter\Boot::bootSpark($paths));
87+
exit(Boot::bootSpark($paths));

system/Debug/Toolbar/Views/toolbar.tpl.php

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
<?php declare(strict_types=1);
2+
use CodeIgniter\Debug\Toolbar;
3+
use CodeIgniter\View\Parser;
4+
25
/**
3-
* @var CodeIgniter\Debug\Toolbar $this
4-
* @var int $totalTime
5-
* @var int $totalMemory
6-
* @var string $url
7-
* @var string $method
8-
* @var bool $isAJAX
9-
* @var int $startTime
10-
* @var int $totalTime
11-
* @var int $totalMemory
12-
* @var float $segmentDuration
13-
* @var int $segmentCount
14-
* @var string $CI_VERSION
15-
* @var array $collectors
16-
* @var array $vars
17-
* @var array $styles
18-
* @var CodeIgniter\View\Parser $parser
6+
* @var Toolbar $this
7+
* @var int $totalTime
8+
* @var int $totalMemory
9+
* @var string $url
10+
* @var string $method
11+
* @var bool $isAJAX
12+
* @var int $startTime
13+
* @var int $totalTime
14+
* @var int $totalMemory
15+
* @var float $segmentDuration
16+
* @var int $segmentCount
17+
* @var string $CI_VERSION
18+
* @var array $collectors
19+
* @var array $vars
20+
* @var array $styles
21+
* @var Parser $parser
1922
*/
2023
?>
2124
<style>

tests/system/Config/fixtures/RegistrarConfig.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
* the LICENSE file that was distributed with this source code.
1212
*/
1313

14-
class RegistrarConfig extends CodeIgniter\Config\BaseConfig
14+
use CodeIgniter\Config\BaseConfig;
15+
16+
class RegistrarConfig extends BaseConfig
1517
{
1618
public $foo = 'bar';
1719
public $bar = [

tests/system/Config/fixtures/SimpleConfig.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
* the LICENSE file that was distributed with this source code.
1212
*/
1313

14-
class SimpleConfig extends CodeIgniter\Config\BaseConfig
14+
use CodeIgniter\Config\BaseConfig;
15+
16+
class SimpleConfig extends BaseConfig
1517
{
1618
public $QZERO;
1719
public $QZEROSTR;

0 commit comments

Comments
 (0)