Skip to content

Commit

Permalink
Remove methods of Str and Stringable (#364)
Browse files Browse the repository at this point in the history
Co-authored-by: Deeka Wong <[email protected]>
  • Loading branch information
huangdijia and huangdijia authored Oct 23, 2023
1 parent d619291 commit 30be671
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 867 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"require": {
"hyperf/collection": "~3.0.0",
"hyperf/macroable": "~3.0.0",
"hyperf/stringable": "~3.0.0",
"hyperf/stringable": "~3.0.40",
"hyperf/support": "~3.0.1",
"nesbot/carbon": "^2.0"
},
Expand Down
192 changes: 3 additions & 189 deletions output/Hyperf/Stringable/Str.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,6 @@

class Str
{
/**
* Get the smallest possible portion of a string between two given values.
*
* @param string $subject
* @param string $from
* @param string $to
* @return string
*/
public static function betweenFirst($subject, $from, $to)
{
}

/**
* Get the namespace of the class path.
*
* @param string $value
* @return string
*/
public static function classNamespace($value)
{
}

/**
* Convert the case of a string.
*
* @return string
*/
public static function convertCase(string $string, int $mode = MB_CASE_FOLD, ?string $encoding = 'UTF-8')
{
}

/**
* Set the callable that will be used to generate UUIDs.
*/
Expand All @@ -58,21 +27,10 @@ public static function createUuidsNormally()
{
}

/**
* Extracts an excerpt from text that matches the first instance of a phrase.
*
* @param string $text
* @param string $phrase
* @param array $options
* @return string|null
*/
public static function excerpt($text, $phrase = '', $options = [])
{
}

/**
* Remove all strings from the casing caches.
* @deprecated since 3.0.58, remove in 3.1.0.
* @deprecated
*/
public static function flushCache()
{
Expand All @@ -98,26 +56,6 @@ public static function isAscii($value)
{
}

/**
* Determine if a given string is valid JSON.
*
* @param string $value
* @return bool
*/
public static function isJson($value)
{
}

/**
* Make a string's first character lowercase.
*
* @param string $string
* @return string
*/
public static function lcfirst($string)
{
}

/**
* Converts GitHub flavored Markdown into HTML.
*
Expand All @@ -138,20 +76,6 @@ public static function inlineMarkdown($string, array $options = [])
{
}

/**
* Generate a random, secure password.
*
* @param int $length
* @param bool $letters
* @param bool $numbers
* @param bool $symbols
* @param bool $spaces
* @return string
*/
public static function password($length = 32, $letters = true, $numbers = true, $symbols = true, $spaces = false)
{
}

/**
* Find the multi-byte safe position of the first occurrence of a given substring in a string.
*
Expand All @@ -165,78 +89,13 @@ public static function position($haystack, $needle, $offset = 0, $encoding = nul
{
}

/**
* Replace the first occurrence of the given value if it appears at the start of the string.
*
* @param string $search
* @param string $replace
* @param string $subject
* @return string
*/
public static function replaceStart($search, $replace, $subject)
{
}

/**
* Replace the last occurrence of a given value if it appears at the end of the string.
*
* @param string $search
* @param string $replace
* @param string $subject
* @return string
*/
public static function replaceEnd($search, $replace, $subject)
{
}

/**
* Reverse the given string.
*
* @return string
*/
public static function reverse(string $value)
{
}

/**
* Remove all "extra" blank space from the given string.
*
* @param string $value
* @return string
*/
public static function squish($value)
{
}

/**
* Replace text within a portion of a string.
*
* @param array|string $string
* @param array|string $replace
* @param array|int $offset
* @param array|int|null $length
* @return array|string
*/
public static function substrReplace($string, $replace, $offset = 0, $length = null)
{
}

/**
* Swap multiple keywords in a string with other keywords.
*
* @param string $subject
* @return string
*/
public static function swap(array $map, $subject)
{
}

/**
* Take the first or last {$limit} characters of a string.
*
* @param string $string
* @return string
*/
public static function take($string, int $limit): string
public static function take($string, int $limit)
{
}

Expand All @@ -251,49 +110,4 @@ public static function take($string, int $limit): string
public static function transliterate($string, $unknown = '?', $strict = false)
{
}

/**
* Split a string into pieces by uppercase characters.
*
* @param string $string
* @return array
*/
public static function ucsplit($string)
{
}

/**
* Get the number of words a string contains.
*
* @param string $string
* @return int
*/
public static function wordCount($string)
{
}

/**
* Wrap the string with the given strings.
*
* @param string $before
* @param string|null $after
* @param mixed $value
* @return string
*/
public static function wrap($value, $before, $after = null)
{
}

/**
* Wrap a string to a given number of characters.
*
* @param string $string
* @param int $characters
* @param string $break
* @param bool $cutLongWords
* @return string
*/
public static function wordWrap($string, $characters = 75, $break = "\n", $cutLongWords = false)
{
}
}
Loading

0 comments on commit 30be671

Please sign in to comment.