mirror of
https://github.com/fzaninotto/Faker.git
synced 2025-03-24 09:19:50 +01:00
Merge pull request #258 from fzaninotto/fix_documentor
Fix Image provider and documentor routine
This commit is contained in:
commit
d3f9e81929
@ -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);
|
||||
}
|
||||
|
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user