Skip to content

Commit c6142f9

Browse files
committed
refactor: remove unneeded condition
1 parent b6e870b commit c6142f9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

system/Test/FeatureTestCase.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -374,13 +374,16 @@ protected function setRequestBody($request, ?array $params = null)
374374
if ($params === null || $params === []) {
375375
$params = $request->fetchGlobal('request');
376376
}
377+
377378
$formatMime = '';
379+
378380
if ($this->bodyFormat === 'json') {
379381
$formatMime = 'application/json';
380382
} elseif ($this->bodyFormat === 'xml') {
381383
$formatMime = 'application/xml';
382384
}
383-
if ($formatMime !== '' && $formatMime !== '0' && ! empty($params)) {
385+
386+
if ($formatMime !== '' && ! empty($params)) {
384387
$formatted = Services::format()->getFormatter($formatMime)->format($params);
385388
$request->setBody($formatted);
386389
$request->setHeader('Content-Type', $formatMime);

0 commit comments

Comments
 (0)