Skip to content

Commit 0c8ce85

Browse files
committed
update index.php
1 parent bbe75bd commit 0c8ce85

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

webroot/index.php

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,31 @@
1-
<?php declare(strict_types = 1);
1+
<?php
22

33
use 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

0 commit comments

Comments
 (0)