4141 OrderEntriesTransformer ,
4242 OrderEntries \Comparator ,
4343 OrderEntries \TypeComparator ,
44- RenameAllCaseTransformer ,
44+ RenameEachTransformer ,
4545 RenameEntryTransformer ,
4646 RenameStrReplaceAllEntriesTransformer ,
4747 ScalarFunctionFilterTransformer ,
4848 ScalarFunctionTransformer ,
4949 SelectEntriesTransformer ,
50+ StyleConverter \RenameStrategy ,
5051 UntilTransformer ,
5152 WindowFunctionTransformer };
5253use Flow \Filesystem \Path \Filter ;
@@ -84,7 +85,8 @@ public function autoCast() : self
8485 * Merge/Split Rows yielded by Extractor into batches of given size.
8586 * For example, when Extractor is yielding one row at time, this method will merge them into batches of given size
8687 * before passing them to the next pipeline element.
87- * Similarly when Extractor is yielding batches of rows, this method will split them into smaller batches of given size.
88+ * Similarly when Extractor is yielding batches of rows, this method will split them into smaller batches of given
89+ * size.
8890 *
8991 * In order to merge all Rows into a single batch use DataFrame::collect() method or set size to -1 or 0.
9092 *
@@ -210,7 +212,8 @@ public function crossJoin(self $dataFrame, string $prefix = '') : self
210212
211213 /**
212214 * @param int $limit maximum numbers of rows to display
213- * @param bool|int $truncate false or if set to 0 columns are not truncated, otherwise default truncate to 20 characters
215+ * @param bool|int $truncate false or if set to 0 columns are not truncated, otherwise default truncate to 20
216+ * characters
214217 * @param Formatter $formatter
215218 *
216219 * @trigger
@@ -258,7 +261,8 @@ public function dropDuplicates(string|Reference ...$entries) : self
258261 }
259262
260263 /**
261- * Drop all partitions from Rows, additionally when $dropPartitionColumns is set to true, partition columns are also removed.
264+ * Drop all partitions from Rows, additionally when $dropPartitionColumns is set to true, partition columns are
265+ * also removed.
262266 *
263267 * @lazy
264268 */
@@ -636,10 +640,12 @@ public function renameAll(string $search, string $replace) : self
636640
637641 /**
638642 * @lazy
643+ *
644+ * @deprecated use DataFrame::renameEach() with a selected RenameStrategy
639645 */
640646 public function renameAllLowerCase () : self
641647 {
642- $ this ->pipeline -> add ( new RenameAllCaseTransformer (lower: true ) );
648+ $ this ->renameEach (RenameStrategy:: LOWER );
643649
644650 return $ this ;
645651 }
@@ -658,30 +664,43 @@ public function renameAllStyle(StringStyles|string $style) : self
658664
659665 /**
660666 * @lazy
667+ *
668+ * @deprecated use DataFrame::renameEach() with a selected RenameStrategy
661669 */
662670 public function renameAllUpperCase () : self
663671 {
664- $ this ->pipeline -> add ( new RenameAllCaseTransformer (upper: true ) );
672+ $ this ->renameEach (RenameStrategy:: UPPER );
665673
666674 return $ this ;
667675 }
668676
669677 /**
670678 * @lazy
679+ *
680+ * @deprecated use DataFrame::renameEach() with a selected RenameStrategy
671681 */
672682 public function renameAllUpperCaseFirst () : self
673683 {
674- $ this ->pipeline -> add ( new RenameAllCaseTransformer (ucfirst: true ) );
684+ $ this ->renameEach (RenameStrategy:: UCFIRST );
675685
676686 return $ this ;
677687 }
678688
679689 /**
680690 * @lazy
691+ *
692+ * @deprecated use DataFrame::renameEach() with a selected RenameStrategy
681693 */
682694 public function renameAllUpperCaseWord () : self
683695 {
684- $ this ->pipeline ->add (new RenameAllCaseTransformer (ucwords: true ));
696+ $ this ->renameEach (RenameStrategy::UCWORDS );
697+
698+ return $ this ;
699+ }
700+
701+ public function renameEach (RenameStrategy $ strategy ) : self
702+ {
703+ $ this ->pipeline ->add (new RenameEachTransformer ($ strategy ));
685704
686705 return $ this ;
687706 }
@@ -825,8 +844,8 @@ public function transform(Transformer|Transformation|Transformations|WithEntry $
825844 }
826845
827846 /**
828- * The difference between filter and until is that filter will keep filtering rows until extractors finish yielding rows.
829- * Until will send a STOP signal to the Extractor when the condition is not met.
847+ * The difference between filter and until is that filter will keep filtering rows until extractors finish yielding
848+ * rows. Until will send a STOP signal to the Extractor when the condition is not met.
830849 *
831850 * @lazy
832851 */
0 commit comments