src/ClearSaleID/Entity/Request/Phone.php
public function setDDI( $ddi )
    {
        $ddi = preg_replace( '/^0+|\D/', '', $ddi );

        if (strlen( $ddi ) < 1 || strlen( $ddi ) > 3) {
            throw new InvalidArgumentException( sprintf( 'Invalid DDI (%s)', $ddi ) );
        }

        $this->ddi = $ddi;

        return $this;
    }
public function setDDI( $ddi )
    {
        $ddi = preg_replace( '/^0+|\D/', '', $ddi );

        if (strlen( $ddi ) < 1 || strlen( $ddi ) > 3) {
            throw new InvalidArgumentException( sprintf( 'Invalid DDI (%s)', $ddi ) );
        }

        $this->ddi = $ddi;

        return $this;
    }
@param  string $ddi

@return $this