src/DTOUrl/Url.php
public function addUser($user)
    {
        //only add the information if there are username and password
        if ($user && $this->getPass()) {
            $this->fullUrl['credentials'] = $user . ':' . $this->getPass() . '@';
        }

        return $this;
    }
public function addUser($user)
    {
        //only add the information if there are username and password
        if ($user && $this->getPass()) {
            $this->fullUrl['credentials'] = $user . ':' . $this->getPass() . '@';
        }

        return $this;
    }
public function addUser ( $ user ) { //only add the information if there are username and password if ( $ user && $ this -> getPass ( ) ) { $ this -> fullUrl [ 'credentials' ] = $ user . ':' . $ this -> getPass ( ) . '@' ; } return $ this ; }
Add the credentials to the final url, both username and password are
added in this stage

@param string $user
@return Url
Add the credentials to the final url both username and password are added in this stage