Skip to content

Commit 71d803d

Browse files
committed
cs fix
1 parent daa87e1 commit 71d803d

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

src/StaticPHP/Artifact/Artifact.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ public function emitAfterSourceExtract(string $target_path): void
493493
* Emit all after binary extract callbacks for the specified platform.
494494
*
495495
* @param null|string $target_path The directory where binary was extracted
496-
* @param string $platform The platform string (e.g., 'linux-x86_64')
496+
* @param string $platform The platform string (e.g., 'linux-x86_64')
497497
*/
498498
public function emitAfterBinaryExtract(?string $target_path, string $platform): void
499499
{

src/StaticPHP/Artifact/ArtifactExtractor.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,21 @@ protected function unzipWithStrip(string $zip_file, string $extract_path): void
570570
FileSystem::removeDir($temp_dir);
571571
}
572572

573+
/**
574+
* Replace path variables.
575+
*/
576+
protected function replacePathVariables(string $path): string
577+
{
578+
$replacement = [
579+
'{pkg_root_path}' => PKG_ROOT_PATH,
580+
'{build_root_path}' => BUILD_ROOT_PATH,
581+
'{source_path}' => SOURCE_PATH,
582+
'{download_path}' => DOWNLOAD_PATH,
583+
'{working_dir}' => WORKING_DIR,
584+
];
585+
return str_replace(array_keys($replacement), array_values($replacement), $path);
586+
}
587+
573588
/**
574589
* Move file or directory, handling cross-device scenarios
575590
* Uses rename() if possible, falls back to copy+delete for cross-device moves
@@ -608,21 +623,6 @@ private static function moveFileOrDir(string $source, string $dest): void
608623
}
609624
}
610625

611-
/**
612-
* Replace path variables.
613-
*/
614-
protected function replacePathVariables(string $path): string
615-
{
616-
$replacement = [
617-
'{pkg_root_path}' => PKG_ROOT_PATH,
618-
'{build_root_path}' => BUILD_ROOT_PATH,
619-
'{source_path}' => SOURCE_PATH,
620-
'{download_path}' => DOWNLOAD_PATH,
621-
'{working_dir}' => WORKING_DIR,
622-
];
623-
return str_replace(array_keys($replacement), array_values($replacement), $path);
624-
}
625-
626626
private function copyFile(string $source_file, string $target_path): void
627627
{
628628
FileSystem::createDir(dirname($target_path));

0 commit comments

Comments
 (0)