Skip to content

Commit f6d779c

Browse files
committed
PHP 8.2 > Using ${var} in strings is deprecated, use {$var} instead.
1 parent fa161a1 commit f6d779c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/command/sfAnsiColorFormatter.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function formatSection($section, $text, $size = null, $style = 'INFO')
100100
$style = array_key_exists($style, $this->styles) ? $style : 'INFO';
101101
$width = 9 + strlen($this->format('', $style));
102102

103-
return sprintf(">> %-${width}s %s", $this->format($section, $style), $this->excerpt($text, $size - 4 - (strlen($section) > 9 ? strlen($section) : 9)));
103+
return sprintf(">> %-{$width}s %s", $this->format($section, $style), $this->excerpt($text, $size - 4 - (strlen($section) > 9 ? strlen($section) : 9)));
104104
}
105105

106106
/**

lib/task/help/sfHelpTask.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ protected function outputAsText(sfTask $task)
9696
foreach ($task->getArguments() as $argument)
9797
{
9898
$default = null !== $argument->getDefault() && (!is_array($argument->getDefault()) || count($argument->getDefault())) ? $this->formatter->format(sprintf(' (default: %s)', is_array($argument->getDefault()) ? str_replace("\n", '', print_r($argument->getDefault(), true)): $argument->getDefault()), 'COMMENT') : '';
99-
$messages[] = sprintf(" %-${max}s %s%s", $this->formatter->format($argument->getName(), 'INFO'), $argument->getHelp(), $default);
99+
$messages[] = sprintf(" %-{$max}s %s%s", $this->formatter->format($argument->getName(), 'INFO'), $argument->getHelp(), $default);
100100
}
101101

102102
$messages[] = '';

lib/task/help/sfListTask.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ protected function outputAsText($namespace, $tasks)
120120

121121
$aliases = $task->getAliases() ? $this->formatter->format(' ('.implode(', ', $task->getAliases()).')', 'COMMENT') : '';
122122

123-
$messages[] = sprintf(" %-${width}s %s%s", $this->formatter->format(':'.$task->getName(), 'INFO'), $task->getBriefDescription(), $aliases);
123+
$messages[] = sprintf(" %-{$width}s %s%s", $this->formatter->format(':'.$task->getName(), 'INFO'), $task->getBriefDescription(), $aliases);
124124
}
125125

126126
$this->log($messages);

0 commit comments

Comments
 (0)