Skip to content

Commit 963b2e2

Browse files
committed
refactor: remove uneeded isset()
1 parent d9d19c6 commit 963b2e2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

system/Test/FeatureTestTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ protected function populateGlobals(string $method, Request $request, ?array $par
371371
*/
372372
protected function setRequestBody(Request $request, ?array $params = null): Request
373373
{
374-
if (isset($this->bodyFormat) && $this->bodyFormat !== '') {
374+
if ($this->bodyFormat !== '') {
375375
$formatMime = '';
376376
if ($this->bodyFormat === 'json') {
377377
$formatMime = 'application/json';
@@ -390,7 +390,7 @@ protected function setRequestBody(Request $request, ?array $params = null): Requ
390390
}
391391

392392
// withBody() has higher priority than $params of withBodyFormat().
393-
if (isset($this->requestBody) && $this->requestBody !== '') {
393+
if ($this->requestBody !== '') {
394394
$request->setBody($this->requestBody);
395395
}
396396

0 commit comments

Comments
 (0)