Skip to content

Commit

Permalink
Inline used methods from vendor class
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Nov 12, 2023
1 parent 48a8d19 commit 852f54f
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions monorepo/scripts/docs/MarkdownFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
* @internal
*/

use Illuminate\Support\Str;

// require_once __DIR__.'/../../../vendor/autoload.php';

$timeStart = microtime(true);
Expand Down Expand Up @@ -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);
}
}

0 comments on commit 852f54f

Please sign in to comment.