Skip to content

Commit

Permalink
updating typehints to use nullable ints
Browse files Browse the repository at this point in the history
Signed-off-by: RJ Garcia <rj@bighead.net>
  • Loading branch information
ragboyjr committed Feb 21, 2019
1 parent 1708916 commit 824a44f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ expect(toArray($res))->equal([[1, 2, 3], [4]]);



<h3 id="api-krak-fn-chunkby">chunkBy(callable $fn, iterable $iter, $maxSize = null): iterable</h3>
<h3 id="api-krak-fn-chunkby">chunkBy(callable $fn, iterable $iter, ?int $maxSize = null): iterable</h3>

**Name:** `Krak\Fn\chunkBy`

Expand Down Expand Up @@ -579,7 +579,7 @@ expect(toArrayWithKeys($res))->equal(['a' => 1, 'b' => 2]);



<h3 id="api-krak-fn-groupby">groupBy(callable $fn, iterable $iter, $maxSize = null): iterable</h3>
<h3 id="api-krak-fn-groupby">groupBy(callable $fn, iterable $iter, ?int $maxSize = null): iterable</h3>

**Name:** `Krak\Fn\groupBy`

Expand Down
4 changes: 2 additions & 2 deletions src/curried.generated.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ function chunk(int $size)
}
};
}
function chunkBy(callable $fn, $maxSize = null)
function chunkBy(callable $fn, ?int $maxSize = null)
{
return function (iterable $iter) use($fn, $maxSize) {
assert($maxSize === null || $maxSize > 0);
Expand All @@ -236,7 +236,7 @@ function chunkBy(callable $fn, $maxSize = null)
}
};
}
function groupBy(callable $fn, $maxSize = null)
function groupBy(callable $fn, ?int $maxSize = null)
{
return function (iterable $iter) use($fn, $maxSize) {
return \Krak\Fn\chunkBy($fn, $iter, $maxSize);
Expand Down
4 changes: 2 additions & 2 deletions src/fn.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ function chunk(int $size, iterable $iter): iterable {
}
}

function chunkBy(callable $fn, iterable $iter, $maxSize = null): iterable {
function chunkBy(callable $fn, iterable $iter, ?int $maxSize = null): iterable {
assert($maxSize === null || $maxSize > 0);
$group = [];
$groupKey = null;
Expand All @@ -204,7 +204,7 @@ function chunkBy(callable $fn, iterable $iter, $maxSize = null): iterable {
}
}

function groupBy(callable $fn, iterable $iter, $maxSize = null): iterable {
function groupBy(callable $fn, iterable $iter, ?int $maxSize = null): iterable {
return \Krak\Fn\chunkBy($fn, $iter, $maxSize);
}

Expand Down

0 comments on commit 824a44f

Please sign in to comment.