Skip to content

Commit 4d815ad

Browse files
committed
Revert "Remove unnecessary extract"
This reverts commit b4a957c.
1 parent b4a957c commit 4d815ad

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

resources/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
<main>
4646
<h1><?= htmlspecialchars((string) $title, ENT_QUOTES, 'UTF-8') ?></h1>
4747
<ul>
48-
<?php foreach ($links as $name => $url): ?>
48+
<?php foreach ($links as $name => $url): ?>
4949
<li><a href="<?= htmlspecialchars((string) $url, ENT_QUOTES, 'UTF-8') ?>"><?= htmlspecialchars((string) $name, ENT_QUOTES, 'UTF-8') ?></a></li>
50-
<?php endforeach; ?>
50+
<?php endforeach; ?>
5151
</ul>
5252
</main>
5353
</body>

src/Command/ReportsCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ private function generateFrontpage(): void
9595
private function renderTemplate(string $title, array $links): string
9696
{
9797
ob_start();
98+
extract([
99+
'title' => $title,
100+
'links' => $links,
101+
]);
98102
include $this->getConfigFile('resources/index.php');
99103

100104
return ob_get_clean();

0 commit comments

Comments
 (0)