Skip to content

Commit

Permalink
Replace mb_rtrim by Str::rtrim
Browse files Browse the repository at this point in the history
  • Loading branch information
bastien-phi committed Dec 30, 2024
1 parent 27df81b commit 15962e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Support/Composer.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function findPath(string $namespace): string

$suffix = (string) Str::of($namespace)->after($rootNamespace)->replace('\\', DIRECTORY_SEPARATOR);

return mb_rtrim(realpath($path) . DIRECTORY_SEPARATOR . $suffix, DIRECTORY_SEPARATOR);
return Str::rtrim(realpath($path) . DIRECTORY_SEPARATOR . $suffix, DIRECTORY_SEPARATOR);
}

/**
Expand All @@ -56,6 +56,6 @@ public function findNamespace(string $path): string

$suffix = (string) Str::of($path)->after($rootPath)->replace(DIRECTORY_SEPARATOR, '\\');

return mb_rtrim(mb_rtrim((string) $rootNamespace, '\\') . $suffix, '\\');
return Str::rtrim(Str::rtrim((string) $rootNamespace, '\\') . $suffix, '\\');
}
}
4 changes: 2 additions & 2 deletions src/Support/Finder.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function domains(): Collection

public function domainPath(string $path): string
{
return mb_rtrim($this->domainRootPath() . Str::start($path, DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR);
return Str::rtrim($this->domainRootPath() . Str::start($path, DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR);
}

private function domainRootPath(): string
Expand All @@ -55,7 +55,7 @@ public function applications(): Collection

public function applicationPath(string $path): string
{
return mb_rtrim($this->applicationRootPath() . Str::start($path, DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR);
return Str::rtrim($this->applicationRootPath() . Str::start($path, DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR);
}

/**
Expand Down

0 comments on commit 15962e2

Please sign in to comment.