Skip to content
Prev Previous commit
Next Next commit
fix(command): Make method compatible with upstream class (backportable)
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Oct 7, 2024
commit fd77bc84d12728ae8e4b72012f82ab2137ad1ba2
2 changes: 1 addition & 1 deletion core/Command/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function cancelOperation(): void {
$this->interrupted = true;
}

public function run(InputInterface $input, OutputInterface $output) {
public function run(InputInterface $input, OutputInterface $output): int {
// check if the php pcntl_signal functions are accessible
$this->php_pcntl_signal = function_exists('pcntl_signal');
if ($this->php_pcntl_signal) {
Expand Down
6 changes: 3 additions & 3 deletions lib/private/Console/TimestampFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function setDecorated($decorated) {
*
* @return bool true if the output will decorate messages, false otherwise
*/
public function isDecorated() {
public function isDecorated(): bool {
return $this->formatter->isDecorated();
}

Expand All @@ -61,7 +61,7 @@ public function setStyle($name, OutputFormatterStyleInterface $style) {
* @param string $name
* @return bool
*/
public function hasStyle($name) {
public function hasStyle($name): bool {
return $this->formatter->hasStyle($name);
}

Expand All @@ -72,7 +72,7 @@ public function hasStyle($name) {
* @return OutputFormatterStyleInterface
* @throws \InvalidArgumentException When style isn't defined
*/
public function getStyle($name) {
public function getStyle($name): OutputFormatterStyleInterface {
return $this->formatter->getStyle($name);
}

Expand Down