modifs.mineures sans commentaires

This commit is contained in:
Jephté Clain 2024-06-13 04:38:53 +04:00
parent 7a8a699294
commit a7ac59ec9c
2 changed files with 4 additions and 4 deletions

View File

@ -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);
}
}

View File

@ -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);
}
}