We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bab942 commit c45ce47Copy full SHA for c45ce47
src/Functional/Minimum.php
@@ -35,17 +35,17 @@ function minimum($collection)
35
{
36
InvalidArgumentException::assertCollection($collection, __FUNCTION__, 1);
37
38
- $max = null;
+ $min = null;
39
40
foreach ($collection as $index => $element) {
41
if (!\is_numeric($element)) {
42
continue;
43
}
44
45
- if ($element < $max || $max === null) {
46
- $max = $element;
+ if ($element < $min || $min === null) {
+ $min = $element;
47
48
49
50
- return $max;
+ return $min;
51
0 commit comments