1
0
mirror of https://github.com/fzaninotto/Faker.git synced 2025-03-24 01:09:50 +01:00

Fix Image provider and documentor routine

Closes #223
This commit is contained in:
Francois Zaninotto 2014-02-24 21:59:58 +01:00
parent c25f380100
commit 274dc3354d
2 changed files with 3 additions and 1 deletions

View File

@ -42,6 +42,8 @@ class Documentor
$example = "array('". join("', '", $example) . "')";
} elseif ($example instanceof \DateTime) {
$example = "DateTime('" . $example->format('Y-m-d H:i:s') . "')";
} elseif ($example instanceof Generator || $example instanceof UniqueGenerator) { // modifier
$example = '';
} else {
$example = var_export($example, true);
}

View File

@ -37,7 +37,7 @@ class Image extends Base
*
* @example '/path/to/dir/13b73edae8443990be1aa8f1a483bc27.jpg'
*/
public static function image($dir, $width = 640, $height = 480, $category = null)
public static function image($dir = '/tmp', $width = 640, $height = 480, $category = null)
{
// Validate directory path
if (!is_dir($dir) || !is_writable($dir)) {