diff options
| author | DJ O'Leary <dijitol@proton.me> | 2025-03-10 00:53:54 +0100 |
|---|---|---|
| committer | DJ O'Leary <dijitol@proton.me> | 2025-03-10 00:53:54 +0100 |
| commit | 344c90117651f0d8df46d5c10a28040b230348bf (patch) | |
| tree | 5919e62b9bb90e1fce75e93150b356e1f52b9a77 /2024/PHP/day_04/Input.php | |
| parent | 89c6ad2d91e18bcdd93d3f7ac85b3c0dbfd9d1b4 (diff) | |
fix: Formatting
Diffstat (limited to '2024/PHP/day_04/Input.php')
| -rw-r--r-- | 2024/PHP/day_04/Input.php | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/2024/PHP/day_04/Input.php b/2024/PHP/day_04/Input.php index f7e03c1..60a16a0 100644 --- a/2024/PHP/day_04/Input.php +++ b/2024/PHP/day_04/Input.php @@ -4,22 +4,22 @@ declare(strict_types=1); class Input { - public string $contents; + 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 __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 - ); + 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); - } + return new Grid($gridArray); + } } |
