mirror of
https://github.com/opdavies/build-configs.git
synced 2025-09-06 19:35:33 +01:00
refactor: add a TemplateFile DTO
Add a data transfer object that stores the source file name, the file name to generate and an optional path to create for each file to generate. As I'm using a `readonly` class for the DTO, this required updating PHP to 8.2. nix develop --command php bin/build-configs run
This commit is contained in:
parent
bd3e77254b
commit
ac1e0dc2c8
3 changed files with 70 additions and 38 deletions
15
src/DataTransferObject/TemplateFile.php
Normal file
15
src/DataTransferObject/TemplateFile.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace OliverDaviesLtd\BuildConfigs\DataTransferObject;
|
||||
|
||||
readonly final class TemplateFile
|
||||
{
|
||||
public function __construct(
|
||||
public string $data,
|
||||
public string $name,
|
||||
public string|null $path = null,
|
||||
) {
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue