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 33 * Copyright © Magento, Inc. All rights reserved.
44 * See COPYING.txt for license details.
55 */
6+ declare (strict_types=1 );
67
78//Register components (via a list of glob patterns)
89namespace Magento \NonComposerComponentRegistration ;
1112
1213/**
1314 * Include files from a list of glob patterns
14- *
15- * @throws RuntimeException
16- * @return void
1715 */
18- $ main = function ()
19- {
16+ (static function (): void {
2017 $ globPatterns = require __DIR__ . '/registration_globlist.php ' ;
21- $ baseDir = dirname (dirname ( __DIR__ ) ) . '/ ' ;
18+ $ baseDir = \ dirname (__DIR__ , 2 ) . '/ ' ;
2219
2320 foreach ($ globPatterns as $ globPattern ) {
2421 // Sorting is disabled intentionally for performance improvement
25- $ files = glob ($ baseDir . $ globPattern , GLOB_NOSORT );
22+ $ files = \ glob ($ baseDir . $ globPattern , GLOB_NOSORT );
2623 if ($ files === false ) {
2724 throw new RuntimeException ("glob(): error with ' $ baseDir$ globPattern' " );
2825 }
29- array_map (function ($ file ) { require_once $ file ; }, $ files );
30- }
31- };
3226
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