summaryrefslogtreecommitdiff
path: root/src/Controllers
diff options
context:
space:
mode:
Diffstat (limited to 'src/Controllers')
-rw-r--r--src/Controllers/EntriesController.php4
-rw-r--r--src/Controllers/SubmissionController.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Controllers/EntriesController.php b/src/Controllers/EntriesController.php
index 13aa8e0..801fe7b 100644
--- a/src/Controllers/EntriesController.php
+++ b/src/Controllers/EntriesController.php
@@ -6,7 +6,7 @@ use Yosymfony\Toml\Toml;
class EntriesController
{
- public function getEntries()
+ public function getEntries(string $formPath): array
{
/**@var Utilities $utilities*/
global $utilities;
@@ -65,7 +65,7 @@ class EntriesController
$entriesForDay = $utilities->scandir($dayPath);
foreach ($entriesForDay as $entryForDay) {
- $entry = Toml::parseFile("$dayPath/$entryForDay");
+ $entry = Toml::parseFile($entryForDay);
if (isset($_GET['flat'])) {
$entries[] = $entry;
} else {
diff --git a/src/Controllers/SubmissionController.php b/src/Controllers/SubmissionController.php
index f2c4c80..2c3d603 100644
--- a/src/Controllers/SubmissionController.php
+++ b/src/Controllers/SubmissionController.php
@@ -8,7 +8,7 @@ use Yosymfony\Toml\TomlBuilder;
class SubmissionController
{
- public function submit(Builder $builder, Validator $validator, $formPath)
+ public function submit(Builder $builder, Validator $validator, string $formPath): array
{
$fields = $builder->buildFields();