refactor: remove unneeded code

This commit is contained in:
kenjis 2023-01-24 09:02:06 +09:00
parent 29c31173b6
commit 299c76e619
No known key found for this signature in database
GPG Key ID: BD254878922AF198

View File

@ -283,21 +283,11 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php foreach ($headers as $value) : ?> <?php foreach ($headers as $header) : ?>
<?php <tr>
if (empty($value)) { <td><?= esc($header->getName(), 'html') ?></td>
continue; <td><?= esc($header->getValueLine(), 'html') ?></td>
} </tr>
if (! is_array($value)) {
$value = [$value];
} ?>
<?php foreach ($value as $h) : ?>
<tr>
<td><?= esc($h->getName(), 'html') ?></td>
<td><?= esc($h->getValueLine(), 'html') ?></td>
</tr>
<?php endforeach; ?>
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
@ -332,7 +322,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php foreach ($headers as $name => $value) : ?> <?php foreach ($headers as $name => $header) : ?>
<tr> <tr>
<td><?= esc($name, 'html') ?></td> <td><?= esc($name, 'html') ?></td>
<td><?= esc($response->getHeaderLine($name), 'html') ?></td> <td><?= esc($response->getHeaderLine($name), 'html') ?></td>