mirror of
https://github.com/symfony/process.git
synced 2026-03-23 23:42:06 +01:00
CS fixes
This commit is contained in:
@@ -50,8 +50,8 @@ class ExecutableFinder
|
||||
*/
|
||||
public function find($name, $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
|
||||
|
||||
@@ -104,7 +104,7 @@ abstract class AbstractPipes implements PipesInterface
|
||||
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_class($this->input), \gettype($input)));
|
||||
}
|
||||
$input = (string) $input;
|
||||
|
||||
@@ -48,7 +48,7 @@ class ProcessUtils
|
||||
if (\is_string($input)) {
|
||||
return $input;
|
||||
}
|
||||
if (is_scalar($input)) {
|
||||
if (\is_scalar($input)) {
|
||||
return (string) $input;
|
||||
}
|
||||
if ($input instanceof Process) {
|
||||
|
||||
@@ -37,7 +37,7 @@ class ExecutableFinderTest extends TestCase
|
||||
|
||||
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 @@ class ExecutableFinderTest extends TestCase
|
||||
|
||||
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 @@ class ExecutableFinderTest extends TestCase
|
||||
|
||||
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 @@ class ExecutableFinderTest extends TestCase
|
||||
|
||||
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 @@ class ExecutableFinderTest extends TestCase
|
||||
$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 @@ class ExecutableFinderTest extends TestCase
|
||||
*/
|
||||
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 @@ class ExecutableFinderTest extends TestCase
|
||||
|
||||
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) {
|
||||
|
||||
@@ -1133,7 +1133,7 @@ class ProcessTest extends TestCase
|
||||
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\';'],
|
||||
|
||||
Reference in New Issue
Block a user