summaryrefslogtreecommitdiff
path: root/2024/PHP/day_04/Input.php
diff options
context:
space:
mode:
authorDJ O'Leary <dijitol@proton.me>2025-11-29 20:23:02 +0100
committerDJ O'Leary <dijitol@proton.me>2025-11-29 20:23:02 +0100
commit4c3a50166bf0f78ce89459c352cc1c6536a8b96d (patch)
tree02e4b66a1435680ef1e92bf82576747b27f16447 /2024/PHP/day_04/Input.php
parentbe2f8528b3829f8263507da301812d852297c168 (diff)
chore: make language folders snake_case
Diffstat (limited to '2024/PHP/day_04/Input.php')
-rw-r--r--2024/PHP/day_04/Input.php25
1 files changed, 0 insertions, 25 deletions
diff --git a/2024/PHP/day_04/Input.php b/2024/PHP/day_04/Input.php
deleted file mode 100644
index 60a16a0..0000000
--- a/2024/PHP/day_04/Input.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-class Input
-{
- public string $contents;
-
- public function __construct(private string $fileName)
- {
- $contents = file_get_contents($this->fileName, use_include_path: true);
- $this->contents = $contents === false ? "" : $contents;
- }
-
- public function toGrid(): Grid
- {
- $lines = explode("\n", $this->contents);
- $gridArray = array_map(
- callback: fn (string $line): array => str_split(trim($line)),
- array: $lines
- );
-
- return new Grid($gridArray);
- }
-}