diff options
author | Daniel Weipert <code@drogueronin.de> | 2022-03-06 01:07:59 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2022-03-06 01:07:59 +0100 |
commit | ad83d1dafac62bb28fda004f86129319a5c3e2ca (patch) | |
tree | dcf119ae4159dcd13c5c3651e54b92e3f7cd4f80 /src/Controllers | |
parent | b2a86c7df7d5a473e80034832a01b21444fa50e6 (diff) |
Refactor fixes
Diffstat (limited to 'src/Controllers')
-rw-r--r-- | src/Controllers/EntriesController.php | 4 | ||||
-rw-r--r-- | src/Controllers/SubmissionController.php | 2 |
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(); |