Skip to content

Commit

Permalink
fix: Add missing PHPDoc to functions in Chain
Browse files Browse the repository at this point in the history
  • Loading branch information
f-lapinski committed Feb 27, 2025
1 parent b61e327 commit d5da75f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/core/etl/src/Flow/ETL/Function/ScalarFunctionChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ public function hash(Algorithm $algorithm = new NativePHPHash()) : self
return new Hash($this, $algorithm);
}

/**
* Returns the index of given $needle in string.
*/
public function indexOf(ScalarFunction|string $needle, ScalarFunction|bool $ignoreCase = false, ScalarFunction|int $offset = 0) : self
{
return new IndexOf($this, $needle, $ignoreCase, $offset);
Expand Down Expand Up @@ -321,6 +324,9 @@ public function isType(string|Type ...$types) : self
return new IsType($this, ...$types);
}

/**
* Check string is utf8 and returns true or false.
*/
public function isUtf8() : IsUtf8
{
return new IsUtf8($this);
Expand Down Expand Up @@ -482,31 +488,50 @@ public function startsWith(ScalarFunction|string $needle) : self
return new StartsWith($this, $needle);
}

/**
* Returns the contents found after the first occurrence of the given string
*/
public function stringAfter(ScalarFunction|string $needle, ScalarFunction|bool $includeNeedle = false) : self
{
return new StringAfter($this, $needle, $includeNeedle);
}

/**
* Returns the contents found after the last occurrence of the given string
*/
public function stringAfterLast(ScalarFunction|string $needle, ScalarFunction|bool $includeNeedle = false) : self
{
return new StringAfterLast($this, $needle, $includeNeedle);
}

/**
* Returns the contents found before the first occurrence of the given string
*/
public function stringBefore(ScalarFunction|string $needle, ScalarFunction|bool $includeNeedle = false) : self
{
return new StringBefore($this, $needle, $includeNeedle);
}

/**
* Returns a string that you can use in case-insensitive comparisons.
*/
public function stringFold() : self
{
return new StringFold($this);
}

/**
* Covert string to a style from enum list, passed in parameter.
* Can be string "upper" or StringStyles::UPPER for Upper (example)
*/
public function stringStyle(ScalarFunction|string|StringStyles $style) : self
{
return new StringStyle($this, $style);
}

/**
* Changes all graphemes/code points to "title case".
*/
public function stringTitle(ScalarFunction|bool $allWords = false) : self
{
return new StringTitle($this, $allWords);
Expand Down

0 comments on commit d5da75f

Please sign in to comment.