upgraded dependencies
This commit is contained in:
12
vendor/psy/psysh/src/Command/SudoCommand.php
vendored
12
vendor/psy/psysh/src/Command/SudoCommand.php
vendored
@@ -3,7 +3,7 @@
|
||||
/*
|
||||
* This file is part of Psy Shell.
|
||||
*
|
||||
* (c) 2012-2018 Justin Hileman
|
||||
* (c) 2012-2022 Justin Hileman
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -95,6 +95,8 @@ HELP
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return int 0 if everything went fine, or an exit code
|
||||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
@@ -109,8 +111,8 @@ HELP
|
||||
$code = $history[\count($history) - 2];
|
||||
}
|
||||
|
||||
if (\strpos('<?', $code) === false) {
|
||||
$code = '<?php ' . $code;
|
||||
if (\strpos($code, '<?') === false) {
|
||||
$code = '<?php '.$code;
|
||||
}
|
||||
|
||||
$nodes = $this->traverser->traverse($this->parse($code));
|
||||
@@ -129,7 +131,7 @@ HELP
|
||||
*
|
||||
* @return array Statements
|
||||
*/
|
||||
private function parse($code)
|
||||
private function parse(string $code): array
|
||||
{
|
||||
try {
|
||||
return $this->parser->parse($code);
|
||||
@@ -139,7 +141,7 @@ HELP
|
||||
}
|
||||
|
||||
// If we got an unexpected EOF, let's try it again with a semicolon.
|
||||
return $this->parser->parse($code . ';');
|
||||
return $this->parser->parse($code.';');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user