mirror of
https://github.com/fzaninotto/Faker.git
synced 2025-03-25 17:59:47 +01:00
Allowing empty parameters for File:file() provider
This commit is contained in:
parent
183d0bad97
commit
5cb638a54c
@ -569,7 +569,7 @@ class File extends \Faker\Provider\Base
|
||||
* @param boolean $fullPath Wether to have the full path or just the filename
|
||||
* @return string
|
||||
*/
|
||||
public static function file($sourceDirectory, $targetDirectory, $fullPath = true)
|
||||
public static function file($sourceDirectory = '/tmp', $targetDirectory = '/tmp', $fullPath = true)
|
||||
{
|
||||
if (!is_dir($sourceDirectory)) {
|
||||
throw new \InvalidArgumentException(sprintf('Source directory %s does not exist or is not a directory.', $sourceDirectory));
|
||||
|
Loading…
x
Reference in New Issue
Block a user