Skip to content

Commit

Permalink
Remove ArrayPushTransformer & CallbackEntryTransformer
Browse files Browse the repository at this point in the history
  • Loading branch information
stloyd committed Oct 5, 2023
1 parent 664d699 commit f17d7d5
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 328 deletions.
1 change: 0 additions & 1 deletion src/core/etl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ Adapters might also define some custom transformers.
* [array keys style converter](src/Flow/ETL/Transformer/ArrayKeysStyleConverterTransformer.php) - [tests](tests/Flow/ETL/Tests/Unit/Transformer/ArrayKeysStyleConverterTransformerTest.php)
* [array sort](src/Flow/ETL/Transformer/ArraySortTransformer.php) - [tests](tests/Flow/ETL/Tests/Unit/Transformer/ArraySortTransformerTest.php)
* **Callback** - *Might come with performance degradation*
* [callback entry](src/Flow/ETL/Transformer/CallbackEntryTransformer.php) - [tests](tests/Flow/ETL/Tests/Unit/Transformer/CallbackEntryTransformerTest.php)
* [callback row](src/Flow/ETL/Transformer/CallbackRowTransformer.php) - [tests](tests/Flow/ETL/Tests/Unit/Transformer/CallbackRowTransformerTest.php)

Some transformers come with complex configuration, please find more details [here](/docs/complex_transformers.md).
Expand Down
33 changes: 0 additions & 33 deletions src/core/etl/src/Flow/ETL/DSL/Transform.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Flow\ETL\Exception\RuntimeException;
use Flow\ETL\Row;
use Flow\ETL\Row\Entries;
use Flow\ETL\Row\Entry;
use Flow\ETL\Row\Factory\NativeEntryFactory;
use Flow\ETL\Row\Reference;
use Flow\ETL\Row\Schema;
Expand Down Expand Up @@ -47,8 +46,6 @@ final public static function add_json_object(string $name, array $data) : Transf
}

/**
* @param string $array_column
* @param string $style
* @param ?Schema $schema Desired schema of unpacked elements. Elements not found in schema will be auto detected.
* It is allowed to provide definitions only for selected elements, like for example
* when converting enum string value into specific Enum.
Expand All @@ -68,20 +65,6 @@ final public static function array_convert_keys(string $array_column, string $st
);
}

/**
* Pushes static values into existing array entry, if array entry does not exist, this transformer
* will create one.
*
* @param string $array_entry
* @param array<mixed> $values
*
* @return Transformer
*/
final public static function array_push(string $array_entry, array $values = []) : Transformer
{
return new Transformer\ArrayPushTransformer($array_entry, $values);
}

final public static function array_reverse(string $array_name) : Transformer
{
return new Transformer\ArrayReverseTransformer($array_name);
Expand All @@ -92,16 +75,6 @@ final public static function array_sort(string $array_name, int $sort_flag = \SO
return new Transformer\ArraySortTransformer($array_name, $sort_flag);
}

/**
* @psalm-param callable(Entry $entry) : Entry ...$callables
*
* @param callable(Entry $entry) : Entry ...$callables
*/
final public static function callback_entry(callable ...$callables) : Transformer
{
return new Transformer\CallbackEntryTransformer(...$callables);
}

/**
* @param callable(Row) : Row $callable
*/
Expand Down Expand Up @@ -157,12 +130,6 @@ public static function rename_all_case(bool $upper = false, bool $lower = false,
return new Transformer\RenameAllCaseTransformer($upper, $lower, $ucfirst, $ucwords);
}

/**
* @param string $search
* @param string $replace
*
* @return Transformer
*/
public static function rename_str_replace_all(string $search, string $replace) : Transformer
{
return new Transformer\RenameStrReplaceAllEntriesTransformer($search, $replace);
Expand Down
63 changes: 0 additions & 63 deletions src/core/etl/src/Flow/ETL/Transformer/ArrayPushTransformer.php

This file was deleted.

90 changes: 0 additions & 90 deletions src/core/etl/src/Flow/ETL/Transformer/CallbackEntryTransformer.php

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit f17d7d5

Please sign in to comment.