We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8f8f10f + a2bd03d commit 18cc792Copy full SHA for 18cc792
src/helpers.php
@@ -6,7 +6,7 @@
6
*
7
* @param string|null $locale
8
*/
9
- function faker(string $locale = '') : \Xefi\Faker\Faker
+ function faker(null|string $locale = '') : \Xefi\Faker\Faker
10
{
11
if ($locale === '') {
12
$locale = app()->bound('config') ?
tests/Unit/HelperTest.php
@@ -11,4 +11,10 @@ public function testFakerHelper() {
$this->assertInstanceOf(Faker::class, $faker);
13
}
14
+
15
+ public function testFakerHelperWithNullLocale() {
16
+ $faker = faker(null);
17
18
+ $this->assertEquals(null, $faker->getLocale());
19
+ }
20
0 commit comments