public function canonizeDigits(array $digits)
    {
        $result = $this->getDigits($this->getValues($digits));

        return empty($result) ? [$this->digits->getDigit(0)] : $result;
    }
public function canonizeDigits(array $digits)
    {
        $result = $this->getDigits($this->getValues($digits));

        return empty($result) ? [$this->digits->getDigit(0)] : $result;
    }
public function canonizeDigits ( array $ digits ) { $ result = $ this -> getDigits ( $ this -> getValues ( $ digits ) ) ; return empty ( $ result ) ? [ $ this -> digits -> getDigit ( 0 ) ] : $ result ; }
Replaces all values in the array with actual digits from the digit list.

This method takes a list of digits and returns the digits properly
capitalized and typed. This can be used to canonize numbers when dealing
with case insensitive and loosely typed number bases.

@param array $digits List of digits to canonize
@return array Canonized list of digits
@throws DigitList\InvalidDigitException If any of the digits are invalid
Replaces all values in the array with actual digits from the digit list .