From a7ac59ec9c1de865ce00c4e02f51406a7fcbb8a2 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Thu, 13 Jun 2024 04:38:53 +0400 Subject: [PATCH] modifs.mineures sans commentaires --- src/file/csv/TAbstractBuilder.php | 4 ++-- src/file/csv/TAbstractReader.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/file/csv/TAbstractBuilder.php b/src/file/csv/TAbstractBuilder.php index 6e16ad2..04e2c75 100644 --- a/src/file/csv/TAbstractBuilder.php +++ b/src/file/csv/TAbstractBuilder.php @@ -14,7 +14,7 @@ trait TAbstractBuilder { # faire un builder dans le même format que le fichier uploadé if ($builder->isExt(".csv")) $class = CsvBuilder::class; else $class = static::class; - return $class($builder->name); + return new $class($builder->name); } if (is_string($builder)) $builder = ["output" => $builder]; if (!is_array($builder)) { @@ -25,6 +25,6 @@ trait TAbstractBuilder { $class = CsvBuilder::class; } if ($class === null) $class = static::class; - return $class($builder); + return new $class(null, $builder); } } diff --git a/src/file/csv/TAbstractReader.php b/src/file/csv/TAbstractReader.php index f340bac..2cd3189 100644 --- a/src/file/csv/TAbstractReader.php +++ b/src/file/csv/TAbstractReader.php @@ -13,7 +13,7 @@ trait TAbstractReader { if ($reader instanceof Upload) { if ($reader->isExt(".csv")) $class = CsvReader::class; else $class = static::class; - return $class($reader->tmpName); + return new $class($reader->tmpName); } if (is_string($reader)) $reader = ["input" => $reader]; if (!is_array($reader)) { @@ -24,6 +24,6 @@ trait TAbstractReader { $class = CsvReader::class; } if ($class === null) $class = static::class; - return $class($reader); + return new $class(null, $reader); } }