1
0
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:
Stefano Sala 2014-03-14 09:15:56 +01:00
parent 183d0bad97
commit 5cb638a54c

View File

@ -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));