String construction of $path was not respecting PSR-7.
The path can be concatenated without delimiters. But there are two cases where the path has to be adjusted to make the URI reference valid as PHP does not allow to throw an exception in __toString():
If the path is rootless and an authority is present, the path MUST be prefixed by "/".
If the path is starting with more than one "/" and no authority is present, the starting slashes MUST be reduced to one.
Fix #202
(This PR also fix one PHPCS warning from Cookies class)
String construction of
$path
was not respecting PSR-7.Fix #202
(This PR also fix one PHPCS warning from
Cookies
class)