File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public function __construct()
2222
2323 $ this ->mainFilePath = storage_path ("$ directory {$ this ->config ['base_file_name ' ]}.json " );
2424
25- if (! preg_match ( ' /\/[\w]+\.json/ms ' , $ this ->mainFilePath )) {
25+ if (empty ( $ this -> config [ ' base_file_name ' ]) || ! str_ends_with ( $ this ->mainFilePath , ' .json ' )) {
2626 throw new MissedProductionFilePathException ();
2727 }
2828 }
Original file line number Diff line number Diff line change @@ -19,11 +19,8 @@ public function setUp(): void
1919 parent ::setUp ();
2020
2121 $ documentationDirectory = config ('auto-doc.drivers.local.directory ' );
22- if (!str_ends_with ($ documentationDirectory , DIRECTORY_SEPARATOR )) {
23- $ documentationDirectory .= DIRECTORY_SEPARATOR ;
24- }
2522
26- self ::$ baseFile ??= $ documentationDirectory .'documentation.json ' ;
23+ self ::$ baseFile ??= $ documentationDirectory .'/ documentation.json ' ;
2724 self ::$ documentation ??= $ this ->getJsonFixture ('tmp_data ' );
2825
2926 if (!is_dir (storage_path ($ documentationDirectory ))) {
You can’t perform that action at this time.
0 commit comments