Skip to content

Commit

Permalink
Replace string interpolation deprectaed in PHP 8.2 (#38983)
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelHu authored Nov 9, 2022
1 parent 1810db6 commit 9cbe6cb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function getLayoutPaths(): array
$s = DIRECTORY_SEPARATOR;

return array_merge(
[JPATH_ADMINISTRATOR . "${s}/components${s}com_scheduler${s}layouts${s}"],
[JPATH_ADMINISTRATOR . "{$s}/components{$s}com_scheduler{$s}layouts{$s}"],
parent::getLayoutPaths()
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ class TaskOption
public function __construct(string $type, string $langConstPrefix)
{
$this->id = $type;
$this->title = Text::_("${langConstPrefix}_TITLE");
$this->desc = Text::_("${langConstPrefix}_DESC");
$this->title = Text::_("{$langConstPrefix}_TITLE");
$this->desc = Text::_("{$langConstPrefix}_DESC");
$this->langConstPrefix = $langConstPrefix;
}

Expand Down
8 changes: 4 additions & 4 deletions libraries/src/Console/TasksStateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ protected function doExecute(InputInterface $input, OutputInterface $output): in

// We couldn't fetch that task :(
if (empty($task->id)) {
$this->ioStyle->error("Task ID '${id}' does not exist!");
$this->ioStyle->error("Task ID '{$id}' does not exist!");

return 1;
}

// If the item is checked-out we need a check in (currently not possible through the CLI)
if ($taskModel->isCheckedOut($task)) {
$this->ioStyle->error("Task ID '${id}' is checked out!");
$this->ioStyle->error("Task ID '{$id}' is checked out!");

return 1;
}
Expand All @@ -148,12 +148,12 @@ protected function doExecute(InputInterface $input, OutputInterface $output): in
$action = Task::STATE_MAP[$state];

if (!$table->publish($id, $state)) {
$this->ioStyle->error("Can't ${action} Task ID '${id}'");
$this->ioStyle->error("Can't {$action} Task ID '{$id}'");

return 3;
}

$this->ioStyle->success("Task ID ${id} ${action}.");
$this->ioStyle->success("Task ID {$id} {$action}.");

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/src/Installer/Adapter/PluginAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public function loadLanguage($path = null)
}

if ($name) {
$extension = "plg_${group}_${name}";
$extension = "plg_{$group}_{$name}";
$source = $path ?: JPATH_PLUGINS . "/$group/$name";
$folder = (string) $element->attributes()->folder;

Expand Down

0 comments on commit 9cbe6cb

Please sign in to comment.