1
0
mirror of https://github.com/danielstjules/Stringy.git synced 2025-08-11 15:54:04 +02:00

Fixed typos/PHPDoc

This commit is contained in:
Pascal Borreli
2013-09-05 23:44:52 +01:00
parent d27683b570
commit 90913d39bc
2 changed files with 6 additions and 6 deletions

View File

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

View File

@@ -418,9 +418,9 @@ class Stringy
* 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'.
*
* @param int $length Desired string length after padding
* @param string $padStr String used to pad, defaults to space
* @return string Object with a right padded $str
* @param int $length Desired string length after padding
* @param string $padStr String used to pad, defaults to space
* @return Stringy Object with a right padded $str
*/
public function padRight($length, $padStr = ' ')
{
@@ -639,7 +639,7 @@ class Stringy
// If the last word was truncated
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);
$truncated = mb_substr($truncated, 0, $lastPos, $stringy->encoding);
}
@@ -947,7 +947,7 @@ class Stringy
/**
* 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
*/
private function matchesPattern($pattern)