Skip to content

Commit

Permalink
CS Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
norberttech committed Feb 25, 2025
1 parent 17225a3 commit 265f3cf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/core/etl/src/Flow/ETL/Transformation/Limit.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

final readonly class Limit implements Transformation
{
public function __construct(private int $limit)
public function __construct(private ?int $limit)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,6 @@ public function test_exceeding_the_limit_in_one_rows_set() : void
self::assertCount(9, $rows);
}

public function test_limit_null() : void
{
$rows = df()
->read(from_array(
\array_map(
fn (int $id) : array => ['id' => $id],
\range(1, 10)
)
))
->limit(null)
->fetch();

self::assertCount(10, $rows);
}

public function test_fetch_with_limit() : void
{
$rows = df()
Expand Down Expand Up @@ -130,6 +115,21 @@ public function test_limit_below_0() : void
df()->read(from_rows(\Flow\ETL\DSL\rows()))->limit(-1);
}

public function test_limit_null() : void
{
$rows = df()
->read(from_array(
\array_map(
fn (int $id) : array => ['id' => $id],
\range(1, 10)
)
))
->limit(null)
->fetch();

self::assertCount(10, $rows);
}

public function test_limit_when_transformation_is_expanding_rows_extracted_from_extractor() : void
{
$rows = df()
Expand Down

0 comments on commit 265f3cf

Please sign in to comment.