mirror of
https://github.com/symfony/console.git
synced 2026-03-24 01:12:13 +01:00
Reduce common control flows
This commit is contained in:
@@ -123,13 +123,13 @@ final class CompletionInput extends ArgvInput
|
||||
if ($this->currentIndex >= \count($this->tokens)) {
|
||||
if (!isset($this->arguments[$argumentName]) || $this->definition->getArgument($argumentName)->isArray()) {
|
||||
$this->completionName = $argumentName;
|
||||
$this->completionValue = '';
|
||||
} else {
|
||||
// we've reached the end
|
||||
$this->completionType = self::TYPE_NONE;
|
||||
$this->completionName = null;
|
||||
$this->completionValue = '';
|
||||
}
|
||||
|
||||
$this->completionValue = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -151,11 +151,7 @@ class ConsoleLoggerTest extends TestCase
|
||||
|
||||
public function testObjectCastToString()
|
||||
{
|
||||
if (method_exists($this, 'createPartialMock')) {
|
||||
$dummy = $this->createPartialMock(DummyTest::class, ['__toString']);
|
||||
} else {
|
||||
$dummy = $this->createPartialMock(DummyTest::class, ['__toString']);
|
||||
}
|
||||
$dummy = $this->createPartialMock(DummyTest::class, ['__toString']);
|
||||
$dummy->method('__toString')->willReturn('DUMMY');
|
||||
|
||||
$this->getLogger()->warning($dummy);
|
||||
|
||||
Reference in New Issue
Block a user