Skip to content

Commit ee89e5f

Browse files
committed
Rename to remove abbreviation
1 parent 7ba91bd commit ee89e5f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Curl;
44

5-
class StrUtil
5+
class StringUtil
66
{
77
/**
88
* Return true when $haystack starts with $needle.

src/Curl/Url.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Curl;
44

5-
use Curl\StrUtil;
5+
use Curl\StringUtil;
66

77
class Url
88
{
@@ -36,15 +36,15 @@ public static function removeDotSegments($input)
3636
while (!empty($input)) {
3737
// A. If the input buffer begins with a prefix of "../" or "./",
3838
// then remove that prefix from the input buffer; otherwise,
39-
if (StrUtil::startsWith($input, '../')) {
39+
if (StringUtil::startsWith($input, '../')) {
4040
$input = substr($input, 3);
41-
} elseif (StrUtil::startsWith($input, './')) {
41+
} elseif (StringUtil::startsWith($input, './')) {
4242
$input = substr($input, 2);
4343

4444
// B. if the input buffer begins with a prefix of "/./" or "/.",
4545
// where "." is a complete path segment, then replace that
4646
// prefix with "/" in the input buffer; otherwise,
47-
} elseif (StrUtil::startsWith($input, '/./')) {
47+
} elseif (StringUtil::startsWith($input, '/./')) {
4848
$input = substr($input, 2);
4949
} elseif ($input === '/.') {
5050
$input = '/';
@@ -54,7 +54,7 @@ public static function removeDotSegments($input)
5454
// prefix with "/" in the input buffer and remove the last
5555
// segment and its preceding "/" (if any) from the output
5656
// buffer; otherwise,
57-
} elseif (StrUtil::startsWith($input, '/../')) {
57+
} elseif (StringUtil::startsWith($input, '/../')) {
5858
$input = substr($input, 3);
5959
$output = substr_replace($output, '', \mb_strrpos($output, '/'));
6060
} elseif ($input === '/..') {
@@ -128,7 +128,7 @@ private function absolutizeUrl()
128128
$target['path'] = $b['path'];
129129
$target['query'] = isset($r['query']) ? $r['query'] : (isset($b['query']) ? $b['query'] : null);
130130
} else {
131-
if (StrUtil::startsWith($r['path'], '/')) {
131+
if (StringUtil::startsWith($r['path'], '/')) {
132132
$target['path'] = self::removeDotSegments($r['path']);
133133
} else {
134134
$base = \mb_strrchr($b['path'], '/', true);

0 commit comments

Comments
 (0)