mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
refactor: remove unneeded code
This commit is contained in:
parent
29c31173b6
commit
299c76e619
@ -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>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user