Skip to content

Commit 898488f

Browse files
committed
formatting
1 parent aa7ed7c commit 898488f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Illuminate/Http/Testing/FileFactory.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,17 @@ public function create($name, $kilobytes = 0)
3030
*/
3131
public function image($name, $width = 10, $height = 10)
3232
{
33-
$type = Str::endsWith($name, ['.jpg', '.jpeg']) ? 'jpeg' : 'png';
34-
35-
return new File($name, $this->generateImage($width, $height, $type));
33+
return new File($name, $this->generateImage(
34+
$width, $height, Str::endsWith(Str::lower($name), ['.jpg', '.jpeg']) ? 'jpeg' : 'png'
35+
));
3636
}
3737

3838
/**
3939
* Generate a dummy image of the given width and height.
4040
*
4141
* @param int $width
4242
* @param int $height
43+
* @param string $type
4344
* @return resource
4445
*/
4546
protected function generateImage($width, $height, $type)

0 commit comments

Comments
 (0)