From caa69b585381cc1c22df3dbb9c943855b8f13a70 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Thu, 5 May 2016 13:28:43 +0200 Subject: typo --- application/HttpUtils.php | 4 ++-- application/Url.php | 2 +- tests/Url/UrlTest.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/application/HttpUtils.php b/application/HttpUtils.php index 0e1ce879..c84ba6f0 100644 --- a/application/HttpUtils.php +++ b/application/HttpUtils.php @@ -27,7 +27,7 @@ function get_http_response($url, $timeout = 30, $maxBytes = 4194304) { $urlObj = new Url($url); - $cleanUrl = $urlObj->indToAscii(); + $cleanUrl = $urlObj->idnToAscii(); if (! filter_var($cleanUrl, FILTER_VALIDATE_URL) || ! $urlObj->isHttp()) { return array(array(0 => 'Invalid HTTP Url'), false); @@ -70,7 +70,7 @@ function get_http_response($url, $timeout = 30, $maxBytes = 4194304) * Retrieve HTTP headers, following n redirections (temporary and permanent ones). * * @param string $url initial URL to reach. - * @param int $redirectionLimit max redirection follow.. + * @param int $redirectionLimit max redirection follow. * * @return array HTTP headers, or false if it failed. */ diff --git a/application/Url.php b/application/Url.php index 61a30a78..77447c8d 100644 --- a/application/Url.php +++ b/application/Url.php @@ -240,7 +240,7 @@ class Url * * @return string converted cleaned up URL. */ - public function indToAscii() + public function idnToAscii() { $out = $this->cleanup(); if (! function_exists('idn_to_ascii') || ! isset($this->parts['host'])) { diff --git a/tests/Url/UrlTest.php b/tests/Url/UrlTest.php index 5fdc8617..ce82265e 100644 --- a/tests/Url/UrlTest.php +++ b/tests/Url/UrlTest.php @@ -190,10 +190,10 @@ class UrlTest extends PHPUnit_Framework_TestCase $ind = 'http://www.académie-française.fr/'; $expected = 'http://www.xn--acadmie-franaise-npb1a.fr/'; $url = new Url($ind); - $this->assertEquals($expected, $url->indToAscii()); + $this->assertEquals($expected, $url->idnToAscii()); $notInd = 'http://www.academie-francaise.fr/'; $url = new Url($notInd); - $this->assertEquals($notInd, $url->indToAscii()); + $this->assertEquals($notInd, $url->idnToAscii()); } } -- cgit v1.2.3