github-actions(deps): bump codecov/codecov-action from 5.0.2 to 5.0.4 #1220
Annotations
9 warnings
Run mutation tests with Xdebug and infection/infection:
src/Inside/Domain/DayOneToObsidian/File/DefaultObsidianAttachmentFileMapper.php#L29
Escaped Mutant for Mutator "UnwrapStrReplace":
--- Original
+++ New
@@ @@
}
public function mapToFileInObsidianAttachmentDirectory(Inside\Domain\DayOne\Photo $dayOnePhoto) : Inside\Domain\Shared\File
{
- return Inside\Domain\Shared\File::create(Inside\Domain\Shared\Path::fromString(\sprintf('%s/%s/+ Attachment/%s', $this->obsidianVaultDirectory->path()->toString(), \str_replace(': ', '/', \urldecode($dayOnePhoto->journal()->file()->fileName()->fileNameWithoutExtension()->toString())), $dayOnePhoto->file()->fileName()->toString())));
+ return Inside\Domain\Shared\File::create(Inside\Domain\Shared\Path::fromString(\sprintf('%s/%s/+ Attachment/%s', $this->obsidianVaultDirectory->path()->toString(), \urldecode($dayOnePhoto->journal()->file()->fileName()->fileNameWithoutExtension()->toString()), $dayOnePhoto->file()->fileName()->toString())));
}
}
|
Run mutation tests with Xdebug and infection/infection:
src/Outside/Adapter/Primary/Console/ConvertCommand.php#L55
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output) : int
{
$io = new Console\Style\SymfonyStyle($input, $output);
- $io->title('Day One to Obsidian Converter');
+
$dayOneDirectoryArgument = $input->getArgument('day-one-directory');
if (!\is_string($dayOneDirectoryArgument)) {
$io->error('DayOne directory must be a string.');
|
Run mutation tests with Xdebug and infection/infection:
src/Outside/Adapter/Secondary/DayOne/JournalFinder.php#L41
Escaped Mutant for Mutator "ArrayOneItem":
--- Original
+++ New
@@ @@
$dayOneJournalReader = $this->dayOneJournalReader;
return \array_reduce($files, static function (array $dayOneJournals, string $file) use($dayOneJournalReader) : array {
if (!\is_file($file)) {
- return $dayOneJournals;
+ return count($dayOneJournals) > 1 ? array_slice($dayOneJournals, 0, 1, true) : $dayOneJournals;
}
try {
$dayOneJournal = $dayOneJournalReader->read(Inside\Domain\Shared\File::create(Inside\Domain\Shared\Path::fromString($file)));
|
Run mutation tests with Xdebug and infection/infection:
src/Outside/Adapter/Secondary/DayOne/JournalFinder.php#L47
Escaped Mutant for Mutator "ArrayOneItem":
--- Original
+++ New
@@ @@
try {
$dayOneJournal = $dayOneJournalReader->read(Inside\Domain\Shared\File::create(Inside\Domain\Shared\Path::fromString($file)));
} catch (Inside\Port\Secondary\DayOne\FileDoesNotContainJson|Inside\Port\Secondary\DayOne\FileDoesNotContainJsonValidAccordingToSchema) {
- return $dayOneJournals;
+ return count($dayOneJournals) > 1 ? array_slice($dayOneJournals, 0, 1, true) : $dayOneJournals;
}
$dayOneJournals[] = $dayOneJournal;
return $dayOneJournals;
|
Run mutation tests with Xdebug and infection/infection:
src/Outside/Adapter/Secondary/DayOne/JournalReader.php#L43
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
throw Inside\Port\Secondary\DayOne\FileDoesNotExist::at($file->path());
}
try {
- $data = \json_decode(\file_get_contents($file->path()->toString()), true, 512, \JSON_THROW_ON_ERROR);
+ $data = \json_decode(\file_get_contents($file->path()->toString()), true, 511, \JSON_THROW_ON_ERROR);
} catch (\JsonException) {
throw Inside\Port\Secondary\DayOne\FileDoesNotContainJson::at($file->path());
}
|
Run mutation tests with Xdebug and infection/infection:
src/Outside/Adapter/Secondary/DayOne/JournalReader.php#L43
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
throw Inside\Port\Secondary\DayOne\FileDoesNotExist::at($file->path());
}
try {
- $data = \json_decode(\file_get_contents($file->path()->toString()), true, 512, \JSON_THROW_ON_ERROR);
+ $data = \json_decode(\file_get_contents($file->path()->toString()), true, 513, \JSON_THROW_ON_ERROR);
} catch (\JsonException) {
throw Inside\Port\Secondary\DayOne\FileDoesNotContainJson::at($file->path());
}
|
Run mutation tests with Xdebug and infection/infection:
src/Outside/Adapter/Secondary/Obsidian/NoteWriter.php#L43
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
---
%s
TXT
-, \trim(Yaml\Yaml::dump($note->frontMatter()->toArray(), 8, 2)), $note->text()->toString());
+, \trim(Yaml\Yaml::dump($note->frontMatter()->toArray(), 7, 2)), $note->text()->toString());
}
$this->filesystem->dumpFile($note->file()->path()->toString(), $content);
}
}
|
Run mutation tests with Xdebug and infection/infection:
src/Outside/Adapter/Secondary/Obsidian/NoteWriter.php#L43
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
---
%s
TXT
-, \trim(Yaml\Yaml::dump($note->frontMatter()->toArray(), 8, 2)), $note->text()->toString());
+, \trim(Yaml\Yaml::dump($note->frontMatter()->toArray(), 9, 2)), $note->text()->toString());
}
$this->filesystem->dumpFile($note->file()->path()->toString(), $content);
}
}
|
Run mutation tests with Xdebug and infection/infection:
src/Outside/Infrastructure/DataNormalizer.php#L34
Escaped Mutant for Mutator "Foreach_":
--- Original
+++ New
@@ @@
if ($keys === $stringKeys) {
\ksort($data);
}
- foreach ($data as $key => $value) {
+ foreach (array() as $key => $value) {
$data[$key] = $this->normalize($value);
}
return $data;
}
}
|
Loading