File tree Expand file tree Collapse file tree 1 file changed +10
-17
lines changed
Expand file tree Collapse file tree 1 file changed +10
-17
lines changed Original file line number Diff line number Diff line change 1- <?php declare (strict_types = 1 );
1+ <?php
22
33use DevNet \System \Runtime \launcher ;
44
5- $ projectFile = simplexml_load_file (__DIR__ . "/../project.phproj " );
5+ $ projectFile = simplexml_load_file (__DIR__ . "/../project.phproj " );
66$ namespace = $ projectFile ->properties ->namespace ;
77$ entrypoint = $ projectFile ->properties ->entrypoint ;
88$ packages = $ projectFile ->dependencies ->package ?? [];
99
10- if (PHP_OS_FAMILY == 'Windows ' )
11- {
10+ if (PHP_OS_FAMILY == 'Windows ' ) {
1211 $ path = getenv ('path ' );
1312 $ paths = explode ('; ' , $ path );
14- }
15- else
16- {
13+ } else {
1714 $ path = getenv ('PATH ' );
1815 $ paths = explode (': ' , $ path );
1916}
2017
21- foreach ($ paths as $ path )
22- {
23- if (file_exists ($ path .'/../autoload.php ' ))
24- {
25- require $ path .'/../autoload.php ' ;
18+ foreach ($ paths as $ path ) {
19+ if (file_exists ($ path . '/../autoload.php ' )) {
20+ require $ path . '/../autoload.php ' ;
2621 break ;
2722 }
2823}
2924
30- foreach ($ packages as $ package )
31- {
25+ foreach ($ packages as $ package ) {
3226 $ include = (string )$ package ->attributes ()->include ;
33- if (file_exists (__DIR__ .'/../ ' .$ include ))
34- {
35- require __DIR__ .'/../ ' .$ include ;
27+ if (file_exists (__DIR__ . '/../ ' . $ include )) {
28+ require __DIR__ . '/../ ' . $ include ;
3629 }
3730}
3831
You can’t perform that action at this time.
0 commit comments