src/Utils/IterableUtils.php
public static function even(array $arr, callable $callback): bool
    {
        if (count($arr) === 0) {
            return false;
        }

        foreach ($arr as $index => $value) {
            if ($callback($value, $index) !== true) { // false, 0 or null
                return false;
            }
        }

        return true;
    }
public static function even(array $arr, callable $callback): bool
    {
        if (count($arr) === 0) {
            return false;
        }

        foreach ($arr as $index => $value) {
            if ($callback($value, $index) !== true) { // false, 0 or null
                return false;
            }
        }

        return true;
    }
public static function even ( array $ arr , callable $ callback ) : bool { if ( count ( $ arr ) === 0 ) { return false ; } foreach ( $ arr as $ index => $ value ) { if ( $ callback ( $ value , $ index ) !== true ) { // false, 0 or null return false ; } } return true ; }
Verify if in all elements the condition is always accepted

@param array $arr The array to be used
@param $callback Function fired in array elements
@return bool
Verify if in all elements the condition is always accepted