Skip to content

Commit

Permalink
Remove usage of References::init in Row class (#1407)
Browse files Browse the repository at this point in the history
  • Loading branch information
stloyd authored Jan 26, 2025
1 parent 59f3433 commit f012687
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/etl/src/Flow/ETL/Row.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Flow\ETL\Exception\InvalidArgumentException;
use Flow\ETL\Hash\{Algorithm, NativePHPHash};
use Flow\ETL\Row\{Entries, Entry, Reference, References, Schema};
use Flow\ETL\Row\{Entries, Entry, Reference, Schema};

final readonly class Row
{
Expand Down Expand Up @@ -82,8 +82,8 @@ public function keep(string|Reference ...$names) : self
{
$entries = [];

foreach (References::init(...$names) as $ref) {
$entries[] = $this->entries->get($ref);
foreach ($names as $name) {
$entries[] = $this->entries->get($name);
}

return new self(new Entries(...$entries));
Expand Down Expand Up @@ -113,9 +113,9 @@ public function remove(string|Reference ...$names) : self
{
$namesToRemove = [];

foreach (References::init(...$names) as $ref) {
if ($this->entries->has($ref)) {
$namesToRemove[] = $ref;
foreach ($names as $name) {
if ($this->entries->has($name)) {
$namesToRemove[] = $name;
}
}

Expand Down

0 comments on commit f012687

Please sign in to comment.