1
0
mirror of https://github.com/danielstjules/Stringy.git synced 2025-08-13 16:53:59 +02:00

Fix method name

applyDelimeter() --> applyDelimiter()

Thankfully, it is a protected method.
This commit is contained in:
vlakoff
2015-01-17 01:52:55 +01:00
parent dd34bc6f85
commit f3bd5b6c62

View File

@@ -277,7 +277,7 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
*/ */
public function dasherize() public function dasherize()
{ {
return $this->applyDelimeter('-'); return $this->applyDelimiter('-');
} }
/** /**
@@ -290,7 +290,7 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
*/ */
public function underscored() public function underscored()
{ {
return $this->applyDelimeter('_'); return $this->applyDelimiter('_');
} }
/** /**
@@ -299,7 +299,7 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
* @param string $delimiter Sequence used to separate parts of the string * @param string $delimiter Sequence used to separate parts of the string
* @return Stringy Object with a delimited $str * @return Stringy Object with a delimited $str
*/ */
protected function applyDelimeter($delimiter) protected function applyDelimiter($delimiter)
{ {
// Save current regex encoding so we can reset it after // Save current regex encoding so we can reset it after
$regexEncoding = mb_regex_encoding(); $regexEncoding = mb_regex_encoding();
@@ -776,7 +776,7 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
$pattern = "/[^a-zA-Z\d\s-_$quotedReplacement]/u"; $pattern = "/[^a-zA-Z\d\s-_$quotedReplacement]/u";
$stringy->str = preg_replace($pattern, '', $stringy->toAscii()); $stringy->str = preg_replace($pattern, '', $stringy->toAscii());
return $stringy->toLowerCase()->applyDelimeter($replacement) return $stringy->toLowerCase()->applyDelimiter($replacement)
->removeLeft($replacement)->removeRight($replacement); ->removeLeft($replacement)->removeRight($replacement);
} }