MathPHP\Functions\Map\Multi::checkArrayLengths PHP Метод

checkArrayLengths() приватный статический Метод

Check that two or more arrays are all the same length
private static checkArrayLengths ( array $arrays ) : boolean
$arrays array
Результат boolean
    private static function checkArrayLengths(array $arrays) : bool
    {
        if (count($arrays) < 2) {
            throw new Exception\BadDataException('Need at least two arrays to map over');
        }
        $n = count($arrays[0]);
        foreach ($arrays as $array) {
            if (count($array) !== $n) {
                throw new Exception\BadDataException('Lengths of arrays are not equal');
            }
        }
        return true;
    }