Skip to content

Commit d7284c5

Browse files
committed
still some old helper string function left
1 parent 088c70a commit d7284c5

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/Classes/PathTemplateResolver.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
namespace Vsch\TranslationManager\Classes;
1010

11+
use Illuminate\Support\Str;
12+
1113
class PathTemplateResolver
1214
{
1315
/** @var \Illuminate\Filesystem\Filesystem */
@@ -355,7 +357,7 @@ protected function loadFileList($prefix, $path_parts, $group_parts)
355357
$prefix = str_replace("\\", "/", $prefix);
356358

357359
for (; ;) {
358-
$isUnderBaseDir = $prefix == $this->normalized_base_path || starts_with($prefix . '/', $this->normalized_base_path . '/');
360+
$isUnderBaseDir = $prefix == $this->normalized_base_path || Str::startsWith($prefix . '/', $this->normalized_base_path . '/');
359361

360362
if (array_key_exists($prefix, $this->processed_dirs) || ($isUnderBaseDir && (!file_exists($prefix) || !is_dir($prefix)))) {
361363
// already handled this one or it does not exist and not under base dir

src/Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ protected static function keyGroup($group, $key)
680680
$prefix = '';
681681
$gkey = $key;
682682

683-
if (starts_with($key, 'vnd:') || starts_with($key, 'wbn:')) {
683+
if (Str::startsWith($key, 'vnd:') || Str::startsWith($key, 'wbn:')) {
684684
// these have vendor with . afterwards in the group
685685
$parts = explode('.', $key, 2);
686686

src/Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ public function getGroupAugmentedList()
391391
$this->augmentedGroupReverseList = [];
392392

393393
foreach ($groupList as $group) {
394-
if (starts_with($group, ["vnd:", "wbn:"])) {
394+
if (Str::startsWith($group, ["vnd:", "wbn:"])) {
395395
// we need this one
396396
$parts = explode('.', $group, 2);
397397
if (count($parts) === 2) {

0 commit comments

Comments
 (0)