-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbootstrap.php
More file actions
33 lines (27 loc) · 1.02 KB
/
Copy pathbootstrap.php
File metadata and controls
33 lines (27 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
declare(strict_types=1);
/**
* This file is part of CodeIgniter 4 framework.
*
* (c) 2023 CodeIgniter Foundation <[email protected]>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
require_once __DIR__ . '/vendor/codeigniter4/framework/system/util_bootstrap.php';
foreach ([
'vendor/codeigniter4/framework/app/Config',
'vendor/codeigniter4/framework/system/Helpers',
] as $directory) {
$iterator = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($directory, RecursiveDirectoryIterator::SKIP_DOTS),
RecursiveIteratorIterator::LEAVES_ONLY | RecursiveIteratorIterator::CHILD_FIRST,
);
/** @var SplFileInfo $file */
foreach ($iterator as $file) {
if ($file->isFile() && $file->getExtension() === 'php') {
require_once $file->getRealPath();
}
}
}
service('autoloader')->addNamespace('CodeIgniter\\PHPStan\\Tests\\Fixtures', __DIR__ . '/tests/Fixtures');