Skip to content

Commit

Permalink
Add Folded ScalarFunction
Browse files Browse the repository at this point in the history
  • Loading branch information
f-lapinski committed Feb 6, 2025
1 parent 6d662aa commit 13d2c65
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/core/etl/src/Flow/ETL/Function/Folded.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function __construct(private readonly ScalarFunction|string $string)
{
}

public function eval(Row $row): mixed
public function eval(Row $row) : mixed
{
$string = (new Parameter($this->string))->asString($row);

Expand All @@ -27,9 +27,8 @@ public function eval(Row $row): mixed
return u($string)->folded()->toString();
}

public function returns(): Type
public function returns() : Type
{
return type_string();
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Flow\ETL\Tests\Unit\Function;

use function Flow\ETL\DSL\row;
use function Flow\ETL\DSL\{lit, folded};
use function Flow\ETL\DSL\{folded, lit};
use Flow\ETL\Tests\FlowTestCase;

final class FoldedTest extends FlowTestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
use League\CommonMark\Extension\CommonMark\Node\Inline\Link;
use League\CommonMark\Extension\ExternalLink\ExternalLinkExtension;
use League\CommonMark\Extension\FrontMatter\FrontMatterExtension;
use League\CommonMark\Extension\HeadingPermalink\{HeadingPermalinkExtension, HeadingPermalinkRenderer};
use League\CommonMark\Extension\HeadingPermalink\{HeadingPermalinkExtension};
use League\CommonMark\Extension\Mention\MentionExtension;
use League\CommonMark\Extension\Table\TableExtension;
use League\CommonMark\Normalizer\SlugNormalizer;

final class LeagueCommonMarkConverterFactory
{
Expand Down

0 comments on commit 13d2c65

Please sign in to comment.