Skip to content

Commit

Permalink
feat: Make the content of dumpFile optional (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry authored Oct 7, 2023
1 parent 49b4fdf commit 1dd372a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/FS.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public static function tempnam(string $dir, string $prefix, string $suffix = '')
*
* @throws IOException if the file cannot be written to
*/
public static function dumpFile(string $filename, $content): void
public static function dumpFile(string $filename, $content = ''): void
{
self::getInstance()->dumpFile(...func_get_args());
}
Expand Down
5 changes: 5 additions & 0 deletions src/FileSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ public function escapePath(string $path): string
return str_replace('/', DIRECTORY_SEPARATOR, $path);
}

public function dumpFile(string $filename, $content = ''): void
{
parent::dumpFile($filename, $content);
}

/**
* Gets the contents of a file.
*
Expand Down

0 comments on commit 1dd372a

Please sign in to comment.