diff --git a/ExecutableFinder.php b/ExecutableFinder.php index 2fe558be..d9d11102 100644 --- a/ExecutableFinder.php +++ b/ExecutableFinder.php @@ -46,8 +46,8 @@ public function addSuffix(string $suffix) */ public function find(string $name, string $default = null, array $extraDirs = []): ?string { - if (ini_get('open_basedir')) { - $searchPath = array_merge(explode(\PATH_SEPARATOR, ini_get('open_basedir')), $extraDirs); + if (\ini_get('open_basedir')) { + $searchPath = array_merge(explode(\PATH_SEPARATOR, \ini_get('open_basedir')), $extraDirs); $dirs = []; foreach ($searchPath as $path) { // Silencing against https://bugs.php.net/69240 diff --git a/Pipes/AbstractPipes.php b/Pipes/AbstractPipes.php index 0e7e5b67..bc3a7a68 100644 --- a/Pipes/AbstractPipes.php +++ b/Pipes/AbstractPipes.php @@ -104,7 +104,7 @@ protected function write(): ?array stream_set_blocking($input, 0); } elseif (!isset($this->inputBuffer[0])) { if (!\is_string($input)) { - if (!is_scalar($input)) { + if (!\is_scalar($input)) { throw new InvalidArgumentException(sprintf('"%s" yielded a value of type "%s", but only scalars and stream resources are supported.', get_debug_type($this->input), get_debug_type($input))); } $input = (string) $input; diff --git a/ProcessUtils.php b/ProcessUtils.php index 6fedd34d..744399d9 100644 --- a/ProcessUtils.php +++ b/ProcessUtils.php @@ -46,7 +46,7 @@ public static function validateInput(string $caller, mixed $input): mixed if (\is_string($input)) { return $input; } - if (is_scalar($input)) { + if (\is_scalar($input)) { return (string) $input; } if ($input instanceof Process) { diff --git a/Tests/ExecutableFinderTest.php b/Tests/ExecutableFinderTest.php index d056841f..5c63cf0f 100644 --- a/Tests/ExecutableFinderTest.php +++ b/Tests/ExecutableFinderTest.php @@ -37,7 +37,7 @@ private function setPath($path) public function testFind() { - if (ini_get('open_basedir')) { + if (\ini_get('open_basedir')) { $this->markTestSkipped('Cannot test when open_basedir is set'); } @@ -51,7 +51,7 @@ public function testFind() public function testFindWithDefault() { - if (ini_get('open_basedir')) { + if (\ini_get('open_basedir')) { $this->markTestSkipped('Cannot test when open_basedir is set'); } @@ -67,7 +67,7 @@ public function testFindWithDefault() public function testFindWithNullAsDefault() { - if (ini_get('open_basedir')) { + if (\ini_get('open_basedir')) { $this->markTestSkipped('Cannot test when open_basedir is set'); } @@ -82,7 +82,7 @@ public function testFindWithNullAsDefault() public function testFindWithExtraDirs() { - if (ini_get('open_basedir')) { + if (\ini_get('open_basedir')) { $this->markTestSkipped('Cannot test when open_basedir is set'); } @@ -105,7 +105,7 @@ public function testFindWithOpenBaseDir() $this->markTestSkipped('Cannot run test on windows'); } - if (ini_get('open_basedir')) { + if (\ini_get('open_basedir')) { $this->markTestSkipped('Cannot test when open_basedir is set'); } @@ -122,7 +122,7 @@ public function testFindWithOpenBaseDir() */ public function testFindProcessInOpenBasedir() { - if (ini_get('open_basedir')) { + if (\ini_get('open_basedir')) { $this->markTestSkipped('Cannot test when open_basedir is set'); } if ('\\' === \DIRECTORY_SEPARATOR) { @@ -140,7 +140,7 @@ public function testFindProcessInOpenBasedir() public function testFindBatchExecutableOnWindows() { - if (ini_get('open_basedir')) { + if (\ini_get('open_basedir')) { $this->markTestSkipped('Cannot test when open_basedir is set'); } if ('\\' !== \DIRECTORY_SEPARATOR) { diff --git a/Tests/NonStopableProcess.php b/Tests/NonStopableProcess.php index 846718f0..d1a694db 100644 --- a/Tests/NonStopableProcess.php +++ b/Tests/NonStopableProcess.php @@ -21,7 +21,7 @@ function handleSignal($signal) $name = match ($signal) { \SIGTERM => 'SIGTERM', \SIGINT => 'SIGINT', - default => $signal . ' (unknown)', + default => $signal.' (unknown)', }; echo "signal $name\n"; diff --git a/Tests/ProcessTest.php b/Tests/ProcessTest.php index 60ee8bc2..013bca9b 100644 --- a/Tests/ProcessTest.php +++ b/Tests/ProcessTest.php @@ -1131,7 +1131,7 @@ public function testTermSignalTerminatesProcessCleanly() public function responsesCodeProvider() { return [ - //expected output / getter / code to execute + // expected output / getter / code to execute // [1,'getExitCode','exit(1);'], // [true,'isSuccessful','exit();'], ['output', 'getOutput', 'echo \'output\';'],