Skip to content

Commit

Permalink
Update Filesystem.php
Browse files Browse the repository at this point in the history
  • Loading branch information
talhaamir4130 authored May 30, 2024
1 parent 872454a commit 508a339
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -632,11 +632,16 @@ public function tempnam(string $dir, string $prefix, string $suffix = ''): strin
* Atomically dumps content into a file.
*
* @param string|resource $content The data to write into the file
* @param bool $ignoreOnTest If phpunit should create a file or not.
*
* @throws IOException if the file cannot be written to
*/
public function dumpFile(string $filename, $content): void
public function dumpFile(string $filename, $content, bool $ignoreOnTest = false): void
{
if ($ignoreOnTest) {
return;
}

if (\is_array($content)) {
throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be string or resource, array given.', __METHOD__));
}
Expand Down

0 comments on commit 508a339

Please sign in to comment.