4242 OrderEntries \Comparator ,
4343 OrderEntries \TypeComparator ,
4444 RenameAllCaseTransformer ,
45+ RenameAllTransformer ,
4546 RenameEntryTransformer ,
4647 RenameStrReplaceAllEntriesTransformer ,
4748 ScalarFunctionFilterTransformer ,
4849 ScalarFunctionTransformer ,
4950 SelectEntriesTransformer ,
51+ StyleConverter \RenameStrategy ,
5052 UntilTransformer ,
5153 WindowFunctionTransformer };
5254use Flow \Filesystem \Path \Filter ;
@@ -84,7 +86,8 @@ public function autoCast() : self
8486 * Merge/Split Rows yielded by Extractor into batches of given size.
8587 * For example, when Extractor is yielding one row at time, this method will merge them into batches of given size
8688 * 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.
89+ * Similarly when Extractor is yielding batches of rows, this method will split them into smaller batches of given
90+ * size.
8891 *
8992 * In order to merge all Rows into a single batch use DataFrame::collect() method or set size to -1 or 0.
9093 *
@@ -210,7 +213,8 @@ public function crossJoin(self $dataFrame, string $prefix = '') : self
210213
211214 /**
212215 * @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
216+ * @param bool|int $truncate false or if set to 0 columns are not truncated, otherwise default truncate to 20
217+ * characters
214218 * @param Formatter $formatter
215219 *
216220 * @trigger
@@ -258,7 +262,8 @@ public function dropDuplicates(string|Reference ...$entries) : self
258262 }
259263
260264 /**
261- * Drop all partitions from Rows, additionally when $dropPartitionColumns is set to true, partition columns are also removed.
265+ * Drop all partitions from Rows, additionally when $dropPartitionColumns is set to true, partition columns are
266+ * also removed.
262267 *
263268 * @lazy
264269 */
@@ -636,10 +641,12 @@ public function renameAll(string $search, string $replace) : self
636641
637642 /**
638643 * @lazy
644+ *
645+ * @deprecated use DataFrame::renameEach() with a selected RenameStrategy
639646 */
640647 public function renameAllLowerCase () : self
641648 {
642- $ this ->pipeline -> add ( new RenameAllCaseTransformer (lower: true ) );
649+ $ this ->renameEach (RenameStrategy:: LOWER );
643650
644651 return $ this ;
645652 }
@@ -658,30 +665,43 @@ public function renameAllStyle(StringStyles|string $style) : self
658665
659666 /**
660667 * @lazy
668+ *
669+ * @deprecated use DataFrame::renameEach() with a selected RenameStrategy
661670 */
662671 public function renameAllUpperCase () : self
663672 {
664- $ this ->pipeline -> add ( new RenameAllCaseTransformer (upper: true ) );
673+ $ this ->renameEach (RenameStrategy:: UPPER );
665674
666675 return $ this ;
667676 }
668677
669678 /**
670679 * @lazy
680+ *
681+ * @deprecated use DataFrame::renameEach() with a selected RenameStrategy
671682 */
672683 public function renameAllUpperCaseFirst () : self
673684 {
674- $ this ->pipeline -> add ( new RenameAllCaseTransformer (ucfirst: true ) );
685+ $ this ->renameEach (RenameStrategy:: UCFIRST );
675686
676687 return $ this ;
677688 }
678689
679690 /**
680691 * @lazy
692+ *
693+ * @deprecated use DataFrame::renameEach() with a selected RenameStrategy
681694 */
682695 public function renameAllUpperCaseWord () : self
683696 {
684- $ this ->pipeline ->add (new RenameAllCaseTransformer (ucwords: true ));
697+ $ this ->renameEach (RenameStrategy::UCWORDS );
698+
699+ return $ this ;
700+ }
701+
702+ public function renameEach (RenameStrategy $ strategy ) : self
703+ {
704+ $ this ->pipeline ->add (new RenameAllTransformer ($ strategy ));
685705
686706 return $ this ;
687707 }
@@ -825,8 +845,8 @@ public function transform(Transformer|Transformation|Transformations|WithEntry $
825845 }
826846
827847 /**
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.
848+ * The difference between filter and until is that filter will keep filtering rows until extractors finish yielding
849+ * rows. Until will send a STOP signal to the Extractor when the condition is not met.
830850 *
831851 * @lazy
832852 */
0 commit comments