diff --git a/monorepo/scripts/docs/MarkdownFormatter.php b/monorepo/scripts/docs/MarkdownFormatter.php index 14eaa751e4f..828d250999c 100644 --- a/monorepo/scripts/docs/MarkdownFormatter.php +++ b/monorepo/scripts/docs/MarkdownFormatter.php @@ -6,8 +6,6 @@ * @internal */ -use Illuminate\Support\Str; - // require_once __DIR__.'/../../../vendor/autoload.php'; $timeStart = microtime(true); @@ -520,3 +518,32 @@ function getSignatures(): array echo "\n\033[33mNo changes to commit\033[0m\n"; } } + +class Str +{ + public static function before($subject, $search) + { + if ($search === '') { + return $subject; + } + + $result = strstr($subject, (string) $search, true); + + return $result === false ? $subject : $result; + } + + public static function ucfirst($string) + { + return static::upper(static::substr($string, 0, 1)).static::substr($string, 1); + } + + public static function upper($value) + { + return mb_strtoupper($value, 'UTF-8'); + } + + public static function substr($string, $start, $length = null, $encoding = 'UTF-8') + { + return mb_substr($string, $start, $length, $encoding); + } +} \ No newline at end of file