private function buildDigitList($digitList)
    {
        if (is_int($digitList)) {
            return new IntegerDigitList($digitList);
        } elseif (is_string($digitList)) {
            return new StringDigitList($digitList);
        } elseif (is_array($digitList)) {
            return new ArrayDigitList($digitList);
        }

        throw new \InvalidArgumentException('Unexpected number base type');
    }
private function buildDigitList($digitList)
    {
        if (is_int($digitList)) {
            return new IntegerDigitList($digitList);
        } elseif (is_string($digitList)) {
            return new StringDigitList($digitList);
        } elseif (is_array($digitList)) {
            return new ArrayDigitList($digitList);
        }

        throw new \InvalidArgumentException('Unexpected number base type');
    }
private function buildDigitList ( $ digitList ) { if ( is_int ( $ digitList ) ) { return new IntegerDigitList ( $ digitList ) ; } elseif ( is_string ( $ digitList ) ) { return new StringDigitList ( $ digitList ) ; } elseif ( is_array ( $ digitList ) ) { return new ArrayDigitList ( $ digitList ) ; } throw new \ InvalidArgumentException ( 'Unexpected number base type' ) ; }
Returns an appropriate type of digit list based on the parameter.
@param int|string|array $digitList List of digits
@return IntegerDigitList|StringDigitList|ArrayDigitList The built digit list
Returns an appropriate type of digit list based on the parameter .