Skip to content

Commit b0c0ecb

Browse files
committed
Rename to suggestions
1 parent 45f257e commit b0c0ecb

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/SPC/builder/LibraryBase.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -317,26 +317,26 @@ abstract protected function build();
317317
protected function install(): void
318318
{
319319
// replace placeholders if BUILD_ROOT_PATH/.spc-extract-placeholder.json exists
320-
$placeholder_file = BUILD_ROOT_PATH . '/.spc-extract-placeholder.json';
321-
if (!file_exists($placeholder_file)) {
320+
$replace_item_file = BUILD_ROOT_PATH . '/.spc-extract-placeholder.json';
321+
if (!file_exists($replace_item_file)) {
322322
return;
323323
}
324-
$placeholders = json_decode(file_get_contents($placeholder_file), true);
325-
if (!is_array($placeholders)) {
326-
throw new RuntimeException('Invalid placeholder file: ' . $placeholder_file);
324+
$replace_items = json_decode(file_get_contents($replace_item_file), true);
325+
if (!is_array($replace_items)) {
326+
throw new RuntimeException('Invalid placeholder file: ' . $replace_item_file);
327327
}
328-
$placeholder_mark = get_pack_placehoder();
328+
$placeholders = get_pack_replace();
329329
// replace placeholders in BUILD_ROOT_PATH
330-
foreach ($placeholders as $item) {
330+
foreach ($replace_items as $item) {
331331
$filepath = BUILD_ROOT_PATH . "/{$item}";
332332
FileSystem::replaceFileStr(
333333
$filepath,
334-
array_values($placeholder_mark),
335-
array_keys($placeholder_mark),
334+
array_values($placeholders),
335+
array_keys($placeholders),
336336
);
337337
}
338338
// remove placeholder file
339-
unlink($placeholder_file);
339+
unlink($replace_item_file);
340340
}
341341

342342
/**

src/SPC/command/dev/PackLibCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function handle(): int
5353

5454
$origin_files = [];
5555
// get pack placehoder defines
56-
$placehoder = get_pack_placehoder();
56+
$placehoder = get_pack_replace();
5757

5858
foreach ($builder->getLibs() as $lib) {
5959
if ($lib->getName() !== $lib_name) {

src/globals/functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ function ac_with_args(string $arg_name, bool $use_value = false): array
233233
return $use_value ? ["--with-{$arg_name}=yes", "--with-{$arg_name}=no"] : ["--with-{$arg_name}", "--without-{$arg_name}"];
234234
}
235235

236-
function get_pack_placehoder(): array
236+
function get_pack_replace(): array
237237
{
238238
return [
239239
BUILD_LIB_PATH => '@build_lib_path@',

0 commit comments

Comments
 (0)