diff --git a/ExecutableFinder.php b/ExecutableFinder.php index 5914b4cd..eb8f0629 100644 --- a/ExecutableFinder.php +++ b/ExecutableFinder.php @@ -48,8 +48,8 @@ public function addSuffix(string $suffix) */ public function find(string $name, string $default = null, array $extraDirs = []) { - 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 01051005..656dc032 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 6cc7a610..2a7aff71 100644 --- a/ProcessUtils.php +++ b/ProcessUtils.php @@ -48,7 +48,7 @@ public static function validateInput(string $caller, $input) 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/ProcessTest.php b/Tests/ProcessTest.php index 4cf2e5d3..1646bcb9 100644 --- a/Tests/ProcessTest.php +++ b/Tests/ProcessTest.php @@ -1133,7 +1133,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\';'],