Skip to content

Commit c45ce47

Browse files
gzglstrojny
authored andcommitted
Use correct variable name in Minimum (lstrojny#191)
1 parent 7bab942 commit c45ce47

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Functional/Minimum.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ function minimum($collection)
3535
{
3636
InvalidArgumentException::assertCollection($collection, __FUNCTION__, 1);
3737

38-
$max = null;
38+
$min = null;
3939

4040
foreach ($collection as $index => $element) {
4141
if (!\is_numeric($element)) {
4242
continue;
4343
}
4444

45-
if ($element < $max || $max === null) {
46-
$max = $element;
45+
if ($element < $min || $min === null) {
46+
$min = $element;
4747
}
4848
}
4949

50-
return $max;
50+
return $min;
5151
}

0 commit comments

Comments
 (0)