Skip to content

Commit de9df47

Browse files
carusogabrielDavertMik
authored andcommitted
Clean elses (#4704)
1 parent d4de71c commit de9df47

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/Codeception/Lib/Connector/Guzzle.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ protected function extractBody(BrowserKitRequest $request)
241241
}
242242
if ($request->getContent() !== null) {
243243
return $request->getContent();
244-
} else {
245-
return $request->getParameters();
246244
}
245+
246+
return $request->getParameters();
247247
}
248248

249249
protected function extractFiles(BrowserKitRequest $request)

tests/unit/Codeception/Module/PhpBrowserTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ private function getLastRequest()
3434
{
3535
if (is_array($this->history)) {
3636
return end($this->history)['request'];
37-
} else {
38-
return $this->history->getLastRequest();
3937
}
38+
39+
return $this->history->getLastRequest();
4040
}
41-
41+
4242
protected function tearDown()
4343
{
4444
if ($this->module) {
@@ -143,7 +143,7 @@ public function testHtmlRedirect()
143143
$this->module->amOnPage('/redirect2');
144144
$this->module->seeResponseCodeIs(200);
145145
$this->module->seeCurrentUrlEquals('/info');
146-
146+
147147
$this->module->amOnPage('/redirect_interval');
148148
$this->module->seeCurrentUrlEquals('/redirect_interval');
149149
}
@@ -172,13 +172,13 @@ public function testMetaRefreshIsIgnoredIfIntervalIsLongerThanMaxInterval()
172172
$this->module->seeResponseCodeIs(200);
173173
$this->module->seeCurrentUrlEquals('/redirect_meta_refresh');
174174
}
175-
175+
176176
public function testRefreshRedirect()
177177
{
178178
$this->module->amOnPage('/redirect3');
179179
$this->module->seeResponseCodeIs(200);
180180
$this->module->seeCurrentUrlEquals('/info');
181-
181+
182182
$this->module->amOnPage('/redirect_header_interval');
183183
$this->module->seeCurrentUrlEquals('/redirect_header_interval');
184184
$this->module->see('Welcome to test app!');
@@ -439,7 +439,7 @@ public function testFormWithFilesInOnlyArray()
439439
$this->module->attachFile('foo[bar]', 'app/avatar.jpg');
440440
$this->module->click('Submit');
441441
}
442-
442+
443443
public function testDoubleSlash()
444444
{
445445
$I = $this->module;
@@ -455,7 +455,7 @@ public function testFillFieldWithoutPage()
455455
$this->setExpectedException("\\Codeception\\Exception\\ModuleException");
456456
$this->module->fillField('#name', 'Nothing special');
457457
}
458-
458+
459459
public function testArrayFieldSubmitForm()
460460
{
461461
$this->skipForOldGuzzle();

0 commit comments

Comments
 (0)