Skip to content

Commit f4b2b9a

Browse files
committed
fix cs
1 parent e44efb2 commit f4b2b9a

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/SPC/builder/unix/UnixBuilderBase.php

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,11 @@ protected function sanityCheck(int $build_target): void
143143
if (getenv('SPC_CMD_VAR_PHP_EMBED_TYPE') === 'shared') {
144144
if (PHP_OS_FAMILY === 'Darwin') {
145145
$ext_path = 'DYLD_LIBRARY_PATH=' . BUILD_LIB_PATH . ':$DYLD_LIBRARY_PATH ';
146-
}
147-
else {
146+
} else {
148147
$ext_path = 'LD_LIBRARY_PATH=' . BUILD_LIB_PATH . ':$LD_LIBRARY_PATH ';
149148
}
150149
FileSystem::removeFileIfExists(BUILD_LIB_PATH . '/libphp.a');
151-
}
152-
else {
150+
} else {
153151
$ext_path = '';
154152
$suffix = PHP_OS_FAMILY === 'Darwin' ? 'dylib' : 'so';
155153
foreach (glob(BUILD_LIB_PATH . "/libphp*.{$suffix}") as $file) {
@@ -276,8 +274,7 @@ protected function buildFrankenphp(): void
276274
$dynamic_exports = '';
277275
if (getenv('SPC_CMD_VAR_PHP_EMBED_TYPE') === 'shared') {
278276
$libphpVersion = preg_replace('/\.\d+$/', '', $libphpVersion);
279-
}
280-
else {
277+
} else {
281278
if ($dynamicSymbolsArgument = LinuxSystemUtil::getDynamicExportedSymbols(BUILD_LIB_PATH . '/libphp.a')) {
282279
$dynamic_exports = ' ' . $dynamicSymbolsArgument;
283280
}
@@ -297,8 +294,8 @@ protected function buildFrankenphp(): void
297294
$libs = $config['libs'];
298295
$libs .= PHP_OS_FAMILY === 'Linux' ? ' -lrt' : '';
299296
// Go's gcc driver doesn't automatically link against -lgcov or -lrt. Ugly, but necessary fix.
300-
if ((str_contains((string)getenv('SPC_DEFAULT_C_FLAGS'), '-fprofile') ||
301-
str_contains((string)getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS'), '-fprofile')) &&
297+
if ((str_contains((string) getenv('SPC_DEFAULT_C_FLAGS'), '-fprofile') ||
298+
str_contains((string) getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS'), '-fprofile')) &&
302299
ToolchainManager::getToolchainClass() === GccNativeToolchain::class) {
303300
$cflags .= ' -Wno-error=missing-profile';
304301
$libs .= ' -lgcov';
@@ -317,8 +314,7 @@ protected function buildFrankenphp(): void
317314
foreach (GoXcaddy::getEnvironment() as $key => $value) {
318315
if ($key === 'PATH') {
319316
GlobalEnvManager::addPathIfNotExists($value);
320-
}
321-
else {
317+
} else {
322318
$env[$key] = $value;
323319
}
324320
}
@@ -329,8 +325,7 @@ protected function buildFrankenphp(): void
329325
if (!$this->getOption('no-strip', false) && file_exists(BUILD_BIN_PATH . '/frankenphp')) {
330326
if (PHP_OS_FAMILY === 'Linux') {
331327
shell()->cd(BUILD_BIN_PATH)->exec('strip --strip-unneeded frankenphp');
332-
}
333-
else { // macOS doesn't understand strip-unneeded
328+
} else { // macOS doesn't understand strip-unneeded
334329
shell()->cd(BUILD_BIN_PATH)->exec('strip -S frankenphp');
335330
}
336331
}

0 commit comments

Comments
 (0)