File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+ declare (strict_types=1 );
6
7
7
8
//Register components (via a list of glob patterns)
8
9
namespace Magento \NonComposerComponentRegistration ;
11
12
12
13
/**
13
14
* Include files from a list of glob patterns
14
- *
15
- * @throws RuntimeException
16
- * @return void
17
15
*/
18
- $ main = function ()
19
- {
16
+ (static function (): void {
20
17
$ globPatterns = require __DIR__ . '/registration_globlist.php ' ;
21
- $ baseDir = dirname (dirname ( __DIR__ ) ) . '/ ' ;
18
+ $ baseDir = \ dirname (__DIR__ , 2 ) . '/ ' ;
22
19
23
20
foreach ($ globPatterns as $ globPattern ) {
24
21
// Sorting is disabled intentionally for performance improvement
25
- $ files = glob ($ baseDir . $ globPattern , GLOB_NOSORT );
22
+ $ files = \ glob ($ baseDir . $ globPattern , GLOB_NOSORT );
26
23
if ($ files === false ) {
27
24
throw new RuntimeException ("glob(): error with ' $ baseDir$ globPattern' " );
28
25
}
29
- array_map (function ($ file ) { require_once $ file ; }, $ files );
30
- }
31
- };
32
26
33
- $ main ();
27
+ \array_map (
28
+ static function (string $ file ): void {
29
+ require_once $ file ;
30
+ },
31
+ $ files
32
+ );
33
+ }
34
+ })();
You can’t perform that action at this time.
0 commit comments