Skip to content

Commit 5bed046

Browse files
bpfoleycpeel
authored andcommitted
add_files.php: Use properties for Loader constructor args
1 parent 3a63d99 commit 5bed046

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

‎tools/project_manager/add_files.php‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,6 @@
173173

174174
class Loader
175175
{
176-
private string $source_project_dir;
177-
private string $dest_project_dir;
178-
private string $projectid;
179-
private bool $allow_text_loads;
180176
private bool $adding_pages;
181177
private int $image_field_len;
182178
/** @var array<string, string> */
@@ -193,13 +189,13 @@ class Loader
193189
private int $n_errors;
194190
private ImageUtils $checker;
195191

196-
public function __construct(string $source_project_dir, string $dest_project_dir, string $projectid, $allow_text_loads = true)
197-
{
198-
$this->source_project_dir = $source_project_dir;
199-
$this->dest_project_dir = $dest_project_dir;
200-
$this->projectid = $projectid;
192+
public function __construct(
193+
private readonly string $source_project_dir,
194+
private readonly string $dest_project_dir,
195+
private readonly string $projectid,
196+
private readonly bool $allow_text_loads = true
197+
) {
201198
$this->checker = new ImageUtils();
202-
$this->allow_text_loads = $allow_text_loads;
203199
}
204200

205201
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

0 commit comments

Comments
 (0)