for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace BenTools\UriFactory\Helper;
use BenTools\UriFactory\UriCanonicalizer;
use BenTools\UriFactory\UriFactory;
use BenTools\UriFactory\UriFactoryInterface;
use Psr\Http\Message\UriInterface;
/**
* @param string $uri
* @param UriFactoryInterface|null $factory
* @return UriInterface
*/
function uri(string $uri, ?UriFactoryInterface $factory = null): UriInterface
{
return UriFactory::factory()->createUri($uri, $factory);
}
* @throws \RuntimeException
function current_location(?UriFactoryInterface $factory = null): UriInterface
return UriFactory::factory()->createUriFromCurrentLocation($factory);
* @param UriInterface $uri
* @throws \InvalidArgumentException
function canonicalize(UriInterface $uri): UriInterface
return UriCanonicalizer::canonicalize($uri);