Skip to content

Commit 03ee97a

Browse files
Add return types - batch 2/n
1 parent d5052fc commit 03ee97a

File tree

5 files changed

+48
-48
lines changed

5 files changed

+48
-48
lines changed

ExecutableFinder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function addSuffix(string $suffix)
4646
*
4747
* @return string|null The executable path or default value
4848
*/
49-
public function find(string $name, string $default = null, array $extraDirs = [])
49+
public function find(string $name, string $default = null, array $extraDirs = []): ?string
5050
{
5151
if (ini_get('open_basedir')) {
5252
$searchPath = array_merge(explode(\PATH_SEPARATOR, ini_get('open_basedir')), $extraDirs);

PhpExecutableFinder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct()
3131
*
3232
* @return string|false The PHP executable path or false if it cannot be found
3333
*/
34-
public function find(bool $includeArgs = true)
34+
public function find(bool $includeArgs = true): string|false
3535
{
3636
if ($php = getenv('PHP_BINARY')) {
3737
if (!is_executable($php)) {
@@ -87,7 +87,7 @@ public function find(bool $includeArgs = true)
8787
*
8888
* @return array The PHP executable arguments
8989
*/
90-
public function findArguments()
90+
public function findArguments(): array
9191
{
9292
$arguments = [];
9393
if ('phpdbg' === \PHP_SAPI) {

PhpProcess.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function __construct(string $script, string $cwd = null, array $env = nul
5353
/**
5454
* {@inheritdoc}
5555
*/
56-
public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, mixed $input = null, ?float $timeout = 60)
56+
public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, mixed $input = null, ?float $timeout = 60): static
5757
{
5858
throw new LogicException(sprintf('The "%s()" method cannot be called when using "%s".', __METHOD__, self::class));
5959
}

0 commit comments

Comments
 (0)