소스 검색

Merge pull request #679 from okaufmann/bugfix/loader-type

Refactor CustomTranslationsLoader for Compatibility with Statamic
Shalvah 1 년 전
부모
커밋
4f9fa4bdfd
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      src/Writing/CustomTranslationsLoader.php

+ 3 - 2
src/Writing/CustomTranslationsLoader.php

@@ -4,16 +4,17 @@ namespace Knuckles\Scribe\Writing;
 
 use Illuminate\Translation\FileLoader;
 use Knuckles\Scribe\Tools\Globals;
+use Illuminate\Contracts\Translation\Loader as LoaderContract;
 
 class CustomTranslationsLoader extends FileLoader
 {
-    protected FileLoader $defaultLoader;
+    protected LoaderContract $defaultLoader;
     protected mixed $langPath;
 
     protected ?array $scribeTranslationsCache = null;
     protected ?array $userTranslationsCache = null;
 
-    public function __construct(FileLoader $loader)
+    public function __construct(LoaderContract $loader)
     {
         $this->defaultLoader = $loader;
         $this->files = app('files');