Introduce render method on Files #23
Annotations
1 error and 5 warnings
Run make mutation-testing
Process completed with exit code 2.
|
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions/cache@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Run make mutation-testing:
src/Files.php#L36
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
foreach (self::render($templates, $destination, $templateVariables) as $file) {
try {
/** @phpstan-ignore-next-line */
- @mkdir(dirname($file->fileName), 0744, true);
+ @mkdir(dirname($file->fileName), 483, true);
} catch (FilesystemException) {
// void @IgnoreException
}
|
Run make mutation-testing:
src/Files.php#L36
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
foreach (self::render($templates, $destination, $templateVariables) as $file) {
try {
/** @phpstan-ignore-next-line */
- @mkdir(dirname($file->fileName), 0744, true);
+ @mkdir(dirname($file->fileName), 485, true);
} catch (FilesystemException) {
// void @IgnoreException
}
|
Run make mutation-testing:
src/Files.php#L58
Escaped Mutant for Mutator "UnwrapRtrim":
--- Original
+++ New
@@ @@
*/
public static function render(string $templates, string $destination, array $templateVariables) : iterable
{
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(rtrim($templates, '/'), FilesystemIterator::SKIP_DOTS | FilesystemIterator::CURRENT_AS_PATHNAME)) as $fileName) {
+ foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($templates, FilesystemIterator::SKIP_DOTS | FilesystemIterator::CURRENT_AS_PATHNAME)) as $fileName) {
if (!is_string($fileName)) {
continue;
}
|
Run make mutation-testing:
src/Files.php#L72
Escaped Mutant for Mutator "UnwrapRtrim":
--- Original
+++ New
@@ @@
if (!is_file($fileName)) {
continue;
}
- $renderedFileName = render(rtrim($destination, '/') . DIRECTORY_SEPARATOR . substr($fileName, strlen($templates)), $templateVariables);
+ $renderedFileName = render($destination . DIRECTORY_SEPARATOR . substr($fileName, strlen($templates)), $templateVariables);
do {
$previousRenderedFileName = $renderedFileName;
$renderedFileName = str_replace(['//', '\\\\'], DIRECTORY_SEPARATOR, $renderedFileName);
|
Loading