Skip to content

Commit 8f6d3ec

Browse files
Reduce common control flows
1 parent a97129d commit 8f6d3ec

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

Completion/CompletionInput.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,13 @@ public function bind(InputDefinition $definition): void
123123
if ($this->currentIndex >= \count($this->tokens)) {
124124
if (!isset($this->arguments[$argumentName]) || $this->definition->getArgument($argumentName)->isArray()) {
125125
$this->completionName = $argumentName;
126-
$this->completionValue = '';
127126
} else {
128127
// we've reached the end
129128
$this->completionType = self::TYPE_NONE;
130129
$this->completionName = null;
131-
$this->completionValue = '';
132130
}
131+
132+
$this->completionValue = '';
133133
}
134134
}
135135

Tests/Logger/ConsoleLoggerTest.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,7 @@ public function testContextReplacement()
151151

152152
public function testObjectCastToString()
153153
{
154-
if (method_exists($this, 'createPartialMock')) {
155-
$dummy = $this->createPartialMock(DummyTest::class, ['__toString']);
156-
} else {
157-
$dummy = $this->createPartialMock(DummyTest::class, ['__toString']);
158-
}
154+
$dummy = $this->createPartialMock(DummyTest::class, ['__toString']);
159155
$dummy->method('__toString')->willReturn('DUMMY');
160156

161157
$this->getLogger()->warning($dummy);

0 commit comments

Comments
 (0)