| | <?php |
| | +require_once __DIR__ . '/../UrlBuilder.php'; |
| | + |
| | interface TagRenderer { |
| | public function renderTagItem( |
 |
| | string $author |
| | ): void { |
| | - $repoParam = '&repo=' . urlencode( $this->repoSafeName ); |
| | - $filesUrl = '?hash=' . $targetSha . $repoParam; |
| | - $commitUrl = '?action=commit&hash=' . $targetSha . $repoParam; |
| | + $filesUrl = (new UrlBuilder()) |
| | + ->withRepo( $this->repoSafeName ) |
| | + ->withAction( 'tree' ) |
| | + ->withHash( $targetSha ) |
| | + ->build(); |
| | + |
| | + $commitUrl = (new UrlBuilder()) |
| | + ->withRepo( $this->repoSafeName ) |
| | + ->withAction( 'commit' ) |
| | + ->withHash( $targetSha ) |
| | + ->build(); |
| | |
| | echo '<tr>'; |