for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Lbc\Helper;
class UrlNormalizer
{
/**
* Test if the url contains a protocol (add http if not)
*
* @param string $url
* @return string
*/
public static function testUrlProtocol($url)
if (substr($url, 0, 4) != "http") {
$url = "http:" . $url;
}
return $url;