Error stacktrace with --dev enabled while conversion is in progress

Also shorter constants.
This commit is contained in:
2023-10-03 09:01:37 +08:00
parent 771fe4931a
commit 5666702ccc
10 changed files with 44 additions and 29 deletions

View File

@@ -57,7 +57,7 @@ class Postman21Converter extends AbstractConverter implements ConverterContract
protected function writeCollection(): bool
{
$filedir = FileSystem::makeDir($this->outputPath);
$filepath = sprintf('%s%s%s.%s', $filedir, DIRECTORY_SEPARATOR, $this->collection->name(), static::FILE_EXT);
$filepath = sprintf('%s%s%s.%s', $filedir, DS, $this->collection->name(), static::FILE_EXT);
return file_put_contents($filepath, $this->collection) > 0;
}