Merge pull request #439 from ergebnis/dependabot/composer/ergebnis/ph… #1229
integrate.yaml
on: push
Matrix: Backward-Compatibility Analysis
Matrix: Code Coverage
Matrix: Coding Standards
Matrix: Dependency Analysis
Matrix: Mutation Tests
Matrix: Refactoring
Matrix: Security Analysis
Matrix: Static Code Analysis
Matrix: Tests
Annotations
9 warnings
Mutation Tests (8.1, locked):
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())));
}
}
|
Mutation Tests (8.1, locked):
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.');
|
Mutation Tests (8.1, locked):
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)));
|
Mutation Tests (8.1, locked):
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;
|
Mutation Tests (8.1, locked):
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());
}
|
Mutation Tests (8.1, locked):
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());
}
|
Mutation Tests (8.1, locked):
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);
}
}
|
Mutation Tests (8.1, locked):
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);
}
}
|
Mutation Tests (8.1, locked):
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;
}
}
|