Skip to content

Commit ed12061

Browse files
committed
change method order
1 parent 9d29b74 commit ed12061

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/Illuminate/Support/Traits/EnumeratesValues.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -956,27 +956,27 @@ protected function equality($value)
956956
}
957957

958958
/**
959-
* Make a function that returns what's passed to it.
959+
* Make a function using another function, by negating its result.
960960
*
961+
* @param \Closure $callback
961962
* @return \Closure
962963
*/
963-
protected function identity()
964+
protected function negate(Closure $callback)
964965
{
965-
return function ($value) {
966-
return $value;
966+
return function (...$params) use ($callback) {
967+
return ! $callback(...$params);
967968
};
968969
}
969970

970971
/**
971-
* Make a function using another function, by negating its result.
972+
* Make a function that returns what's passed to it.
972973
*
973-
* @param \Closure $callback
974974
* @return \Closure
975975
*/
976-
protected function negate(Closure $callback)
976+
protected function identity()
977977
{
978-
return function (...$params) use ($callback) {
979-
return ! $callback(...$params);
978+
return function ($value) {
979+
return $value;
980980
};
981981
}
982982
}

0 commit comments

Comments
 (0)