private function getUnscaledValueWithLeadingZeros() : string
    {
        $value = $this->value;
        $targetLength = $this->scale + 1;
        $negative = ($value[0] === '-');
        $length = \strlen($value);

        if ($negative) {
            $length--;
        }

        if ($length >= $targetLength) {
            return $this->value;
        }

        if ($negative) {
            $value = \substr($value, 1);
        }

        $value = \str_pad($value, $targetLength, '0', STR_PAD_LEFT);

        if ($negative) {
            $value = '-' . $value;
        }

        return $value;
    }
private function getUnscaledValueWithLeadingZeros() : string
    {
        $value = $this->value;
        $targetLength = $this->scale + 1;
        $negative = ($value[0] === '-');
        $length = \strlen($value);

        if ($negative) {
            $length--;
        }

        if ($length >= $targetLength) {
            return $this->value;
        }

        if ($negative) {
            $value = \substr($value, 1);
        }

        $value = \str_pad($value, $targetLength, '0', STR_PAD_LEFT);

        if ($negative) {
            $value = '-' . $value;
        }

        return $value;
    }
private function getUnscaledValueWithLeadingZeros ( ) : string { $ value = $ this -> value ; $ targetLength = $ this -> scale + 1 ; $ negative = ( $ value [ 0 ] === '-' ) ; $ length = \ strlen ( $ value ) ; if ( $ negative ) { $ length -- ; } if ( $ length >= $ targetLength ) { return $ this -> value ; } if ( $ negative ) { $ value = \ substr ( $ value , 1 ) ; } $ value = \ str_pad ( $ value , $ targetLength , '0' , STR_PAD_LEFT ) ; if ( $ negative ) { $ value = '-' . $ value ; } return $ value ; }
Adds leading zeros if necessary to the unscaled value to represent the full decimal number.

@return string
Adds leading zeros if necessary to the unscaled value to represent the full decimal number .