Skip to content

Commit 08f07e3

Browse files
improved processor: improved file attaching
1 parent 784d7fe commit 08f07e3

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/Processor/Processor.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,12 @@ public function attachFiles($inputPath, $outputPath)
7171
unset($files[0], $files[1]);
7272

7373
foreach ($files as $file) {
74-
$absolutePath = "$inputPath/$file";
75-
if (is_file($absolutePath)) {
76-
$this->files[] = new File($absolutePath, $outputPath);
77-
} else {
78-
$this->attachFiles($absolutePath, $outputPath);
79-
}
74+
$this->attachFiles("$inputPath/$file", $outputPath);
8075
}
8176
} else if (is_file($inputPath)) {
8277
$this->files[] = new File($inputPath, $outputPath);
8378
} else {
84-
throw new \Exception('file doesn\'t exists');
79+
throw new \Exception("file doesn't exists");
8580
}
8681
}
8782

0 commit comments

Comments
 (0)