Completely type hint template functions and switch to named arguments

This commit is contained in:
Alex Cabal 2025-03-04 16:08:55 -06:00
parent 6108b5e53d
commit 124e8343fc
125 changed files with 542 additions and 450 deletions

View file

@ -29,12 +29,10 @@ catch(Exceptions\InvalidPermissionsException){
Template::ExitWithCode(Enums\HttpCode::Forbidden);
}
?><?= Template::Header(
[
'title' => 'Projects',
'canonicalUrl' => $user->Url,
'css' => ['/css/project.css'],
'description' => 'Ebook projects currently underway at Standard Ebooks.'
]
title: 'Projects',
canonicalUrl: $user->Url,
css: ['/css/project.css'],
description: 'Ebook projects currently underway at Standard Ebooks.'
) ?>
<main>
<section>
@ -52,7 +50,7 @@ catch(Exceptions\InvalidPermissionsException){
<? if(sizeof($managingProjects) == 0){ ?>
<p class="empty-notice">None.</p>
<? }else{ ?>
<?= Template::ProjectsTable(['projects' => $managingProjects]) ?>
<?= Template::ProjectsTable(projects: $managingProjects) ?>
<? } ?>
</section>
@ -61,7 +59,7 @@ catch(Exceptions\InvalidPermissionsException){
<? if(sizeof($reviewingProjects) == 0){ ?>
<p class="empty-notice">None.</p>
<? }else{ ?>
<?= Template::ProjectsTable(['projects' => $reviewingProjects]) ?>
<?= Template::ProjectsTable(projects: $reviewingProjects) ?>
<? } ?>
</section>
</section>