Adding type hints.
Remove unnecessary variable.
Return Guzzle\Http\Url object.
Use null instead of 'unknown'.
Make method private instead of protected.
More thorough check/ Using isset instead of property_exists.