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

        if (strlen( $ddd ) !== 2) {
            throw new InvalidArgumentException( sprintf( 'Invalid DDD (%s)', $ddd ) );
        }

        $this->ddd = $ddd;

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

        if (strlen( $ddd ) !== 2) {
            throw new InvalidArgumentException( sprintf( 'Invalid DDD (%s)', $ddd ) );
        }

        $this->ddd = $ddd;

        return $this;
    }
@param  string $ddd

@return $this