summaryrefslogtreecommitdiff
path: root/2024/OCaml/lib/day_04/php/Input.php
diff options
context:
space:
mode:
authorDJ O'Leary <dijitol@proton.me>2025-03-03 01:14:16 +0100
committerDJ O'Leary <dijitol@proton.me>2025-03-03 01:14:16 +0100
commit6860b6e83f2c6be5e59253105cf397c5b27b1590 (patch)
treeb4dbad23c012f4e547e5df1d24361818cee50b9a /2024/OCaml/lib/day_04/php/Input.php
parent4da9eabd1223682c50209c7659537aaa0867a107 (diff)
feat: Move 2024 php files
Diffstat (limited to '2024/OCaml/lib/day_04/php/Input.php')
-rw-r--r--2024/OCaml/lib/day_04/php/Input.php25
1 files changed, 0 insertions, 25 deletions
diff --git a/2024/OCaml/lib/day_04/php/Input.php b/2024/OCaml/lib/day_04/php/Input.php
deleted file mode 100644
index f7e03c1..0000000
--- a/2024/OCaml/lib/day_04/php/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);
- }
-}