Add more type hints and work on some code formatting

This commit is contained in:
Alex Cabal 2024-11-08 13:50:59 -06:00
parent 06b82cdaaa
commit c3c588cc1b
35 changed files with 343 additions and 167 deletions

View file

@ -1,9 +1,23 @@
<?
$artwork = $artwork ?? null;
/**
* @var Artwork $artwork
*/
?>
<? if($artwork !== null){ ?>
<? if($artwork->Status == ArtworkStatusType::Approved){ ?>Approved<? } ?>
<? if($artwork->Status == ArtworkStatusType::Declined){ ?>Declined<? } ?>
<? if($artwork->Status == ArtworkStatusType::Unverified){ ?>Unverified<? } ?>
<? if($artwork->EbookUrl !== null){ ?> — in use<? if($artwork->EbookUrl !== null){ ?> by <? if($artwork->Ebook !== null && $artwork->Ebook->Url !== null){ ?><i><a href="<?= $artwork->Ebook->Url ?>"><?= Formatter::EscapeHtml($artwork->Ebook->Title) ?></a></i><? }else{ ?><code><?= Formatter::EscapeHtml($artwork->EbookUrl) ?></code> (unreleased)<? } ?><? } ?><? } ?>
<? if($artwork->Status !== null){ ?>
<?= ucfirst($artwork->Status->value) ?>
<? } ?>
<? if($artwork->EbookUrl !== null){ ?>
in use
<? if($artwork->EbookUrl !== null){ ?>
by
<? if($artwork->Ebook !== null && $artwork->Ebook->Url !== null){ ?>
<i>
<a href="<?= $artwork->Ebook->Url ?>"><?= Formatter::EscapeHtml($artwork->Ebook->Title) ?></a>
</i>
<? }else{ ?>
<code><?= Formatter::EscapeHtml($artwork->EbookUrl) ?></code> (unreleased)
<? } ?>
<? } ?>
<? } ?>
<? } ?>