protected function setLength($length)
    {
        if ($length === null) {
            $length = self::DEFAULT_LENGTH;
        }

        $this->length = $length;
    }
protected function setLength($length)
    {
        if ($length === null) {
            $length = self::DEFAULT_LENGTH;
        }

        $this->length = $length;
    }
protected function setLength ( $ length ) { if ( $ length === null ) { $ length = self :: DEFAULT_LENGTH ; } $ this -> length = $ length ; }
Sets the length of generated token.

@param int $length Token length
@throws \InvalidArgumentException
@return void
Sets the length of generated token .