Skip to content

Commit

Permalink
compatibility: php81, fix actual compat problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrik Plihal committed Dec 13, 2022
1 parent b3e8a07 commit 3a89109
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct(Environment $environment)
* @param OutputInterface $output
* @return int
*/
public function run(InputInterface $input = null, OutputInterface $output = null)
public function run(InputInterface $input = null, OutputInterface $output = null): int
{
if ($input !== null) {
$in = $input;
Expand Down Expand Up @@ -101,7 +101,7 @@ public function getInput(array $argv = null)
try {
return new ArgvInput($argv, $this->environment->getDefinition());
} catch (\Exception $e) {
$this->renderException($e, new ConsoleOutput());
$this->renderThrowable($e, new ConsoleOutput());
exit(1);
}
}
Expand All @@ -112,7 +112,7 @@ public function getInput(array $argv = null)
* @param InputInterface $input
* @return string
*/
public function getCommandName(InputInterface $input)
public function getCommandName(InputInterface $input): string
{
return 'peridot';
}
Expand Down Expand Up @@ -196,7 +196,7 @@ public function setConfiguration(Configuration $configuration)
*
* @return InputDefinition
*/
protected function getDefaultInputDefinition()
protected function getDefaultInputDefinition(): InputDefinition
{
return $this->environment->getDefinition();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function getRunner()
*
* @return string
*/
public function getSynopsis($short = false)
public function getSynopsis($short = false): string
{
return $this->getName() . ' [options] [files]';
}
Expand Down

0 comments on commit 3a89109

Please sign in to comment.