Skip to content

Commit d0b1a07

Browse files
committed
Optimize save method
- Checking to folder to be writable on beforehand, makes no sense. file_put_contents will result in false on error anyway.
1 parent e2afdb9 commit d0b1a07

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/GitChangeLog.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,10 +435,6 @@ protected function formatHashes(array $hashes): string
435435
*/
436436
public function save(string $filePath): void
437437
{
438-
if (!is_writable(dirname($filePath))) {
439-
throw new RuntimeException('Unable to write to file!');
440-
}
441-
442438
$baseContent = '';
443439
if ($this->baseFile !== null) {
444440
$baseContent = file_get_contents($this->baseFile);

0 commit comments

Comments
 (0)