Skip to content

Commit bbe3444

Browse files
authored
Remove helper functions (#263)
1 parent 9f688d6 commit bbe3444

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Assets/AssetRepository.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ public function findByUrl(string $url)
4545
$siteUrl = rtrim(Site::current()->absoluteUrl(), '/');
4646
$containerUrl = $container->url();
4747

48-
if (starts_with($containerUrl, '/')) {
48+
if (Str::startsWith($containerUrl, '/')) {
4949
$containerUrl = $siteUrl.$containerUrl;
5050
}
5151

52-
if (starts_with($containerUrl, $siteUrl)) {
52+
if (Str::startsWith($containerUrl, $siteUrl)) {
5353
$url = $siteUrl.$url;
5454
}
5555

56-
$path = str_after($url, $containerUrl);
56+
$path = Str::after($url, $containerUrl);
5757

58-
if (starts_with($path, '/')) {
58+
if (Str::startsWith($path, '/')) {
5959
$path = substr($path, 1);
6060
}
6161

src/Commands/ImportBlueprints.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ private function importFieldsets()
130130
->getFilesByTypeRecursively($directory, 'yaml');
131131

132132
$this->withProgressBar($files, function ($path) use ($directory) {
133-
$basename = str_after($path, str_finish($directory, '/'));
134-
$handle = str_before($basename, '.yaml');
133+
$basename = Str::after($path, Str::finish($directory, '/'));
134+
$handle = Str::before($basename, '.yaml');
135135
$handle = str_replace('/', '.', $handle);
136136

137137
$fieldset = Fieldset::make($handle)

0 commit comments

Comments
 (0)