fix(command): Make method compatible with upstream class (backportable)

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/48539/head
Joas Schilling 1 year ago
parent 3fa22c3418
commit fd77bc84d1
No known key found for this signature in database
GPG Key ID: F72FA5B49FFA96B0
  1. 2
      core/Command/Base.php
  2. 6
      lib/private/Console/TimestampFormatter.php

@ -149,7 +149,7 @@ class Base extends Command implements CompletionAwareInterface {
$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) {

@ -41,7 +41,7 @@ class TimestampFormatter implements OutputFormatterInterface {
*
* @return bool true if the output will decorate messages, false otherwise
*/
public function isDecorated() {
public function isDecorated(): bool {
return $this->formatter->isDecorated();
}
@ -61,7 +61,7 @@ class TimestampFormatter implements OutputFormatterInterface {
* @param string $name
* @return bool
*/
public function hasStyle($name) {
public function hasStyle($name): bool {
return $this->formatter->hasStyle($name);
}
@ -72,7 +72,7 @@ class TimestampFormatter implements OutputFormatterInterface {
* @return OutputFormatterStyleInterface
* @throws \InvalidArgumentException When style isn't defined
*/
public function getStyle($name) {
public function getStyle($name): OutputFormatterStyleInterface {
return $this->formatter->getStyle($name);
}

Loading…
Cancel
Save