mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 02:46:46 -04:00
Completely type hint template functions and switch to named arguments
This commit is contained in:
parent
6108b5e53d
commit
124e8343fc
125 changed files with 542 additions and 450 deletions
|
@ -1,12 +1,17 @@
|
|||
<?
|
||||
use function Safe\preg_replace;
|
||||
|
||||
$collectionMembership = $collectionMembership ?? null;
|
||||
/**
|
||||
* @var ?CollectionMembership $collectionMembership
|
||||
*/
|
||||
|
||||
$collection = $collectionMembership?->Collection;
|
||||
$sequenceNumber = $collectionMembership?->SequenceNumber;
|
||||
?>
|
||||
<? if($sequenceNumber !== null){ ?>№ <?= number_format($sequenceNumber) ?> in the<? }else{ ?>Part of the<? } ?> <a href="<?= $collection->Url ?>" property="schema:isPartOf"><?= Formatter::EscapeHtml(preg_replace('/^The /ius', '', (string)$collection->Name)) ?></a>
|
||||
<? if($collection->Type !== null){ ?>
|
||||
<? if($collection !== null){ ?>
|
||||
<? if($sequenceNumber !== null){ ?>№ <?= number_format($sequenceNumber) ?> in the<? }else{ ?>Part of the<? } ?> <a href="<?= $collection->Url ?>" property="schema:isPartOf"><?= Formatter::EscapeHtml(preg_replace('/^The /ius', '', $collection->Name)) ?></a>
|
||||
<? } ?>
|
||||
<? if($collection?->Type !== null){ ?>
|
||||
<? if(substr_compare(mb_strtolower($collection->Name), mb_strtolower($collection->Type->value), -strlen(mb_strtolower($collection->Type->value))) !== 0){ ?><?= $collection->Type->value ?><? } ?>
|
||||
<? }else{ ?>
|
||||
collection
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue