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

Merge pull request #13 from pborreli/typos

Closes Issue 13: Fixed typo in PHPDoc
This commit is contained in:
Daniel St. Jules
2013-09-06 05:18:22 -07:00
2 changed files with 6 additions and 6 deletions

View File

@@ -132,7 +132,6 @@ class StaticStringy
* equivalents. * equivalents.
* *
* @param string $str String to remove special chars * @param string $str String to remove special chars
* @param string $encoding The character encoding
* @return string String with those characters removed * @return string String with those characters removed
*/ */
public static function tidy($str) public static function tidy($str)
@@ -146,6 +145,7 @@ class StaticStringy
* multibyte whitespace such as the thin space and ideographic space. * multibyte whitespace such as the thin space and ideographic space.
* *
* @param string $str The string to cleanup whitespace * @param string $str The string to cleanup whitespace
* @param string $encoding The character encoding
* @return string The trimmed string with condensed whitespace * @return string The trimmed string with condensed whitespace
*/ */
public static function collapseWhitespace($str, $encoding = null) public static function collapseWhitespace($str, $encoding = null)

View File

@@ -444,9 +444,9 @@ class Stringy
* Returns a new string of a given length such that the end of the string is * Returns a new string of a given length such that the end of the string is
* padded. Alias for pad() with a $padType of 'right'. * padded. Alias for pad() with a $padType of 'right'.
* *
* @param int $length Desired string length after padding * @param int $length Desired string length after padding
* @param string $padStr String used to pad, defaults to space * @param string $padStr String used to pad, defaults to space
* @return string Object with a right padded $str * @return Stringy Object with a right padded $str
*/ */
public function padRight($length, $padStr = ' ') public function padRight($length, $padStr = ' ')
{ {
@@ -665,7 +665,7 @@ class Stringy
// If the last word was truncated // If the last word was truncated
if (mb_strpos($stringy->str, ' ', $length - 1, $stringy->encoding) != $length) { if (mb_strpos($stringy->str, ' ', $length - 1, $stringy->encoding) != $length) {
// Find pos of the last occurence of a space, and get everything up until // Find pos of the last occurrence of a space, and get everything up until
$lastPos = mb_strrpos($truncated, ' ', 0, $stringy->encoding); $lastPos = mb_strrpos($truncated, ' ', 0, $stringy->encoding);
$truncated = mb_substr($truncated, 0, $lastPos, $stringy->encoding); $truncated = mb_substr($truncated, 0, $lastPos, $stringy->encoding);
} }
@@ -973,7 +973,7 @@ class Stringy
/** /**
* Returns true if $str matches the supplied pattern, false otherwise. * Returns true if $str matches the supplied pattern, false otherwise.
* *
* @param string Regex pattern to match against * @param string $pattern Regex pattern to match against
* @return bool Whether or not $str matches the pattern * @return bool Whether or not $str matches the pattern
*/ */
private function matchesPattern($pattern) private function matchesPattern($pattern)