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.
1 parent 0735548 commit 8f8f10fCopy full SHA for 8f8f10f
src/helpers.php
@@ -6,14 +6,14 @@
6
*
7
* @param string|null $locale
8
*/
9
- function faker(string $locale = null) : \Xefi\Faker\Faker
+ function faker(string $locale = '') : \Xefi\Faker\Faker
10
{
11
- if (app()->bound('config')) {
12
- $locale ??= app('config')->get('app.faker_locale');
+ if ($locale === '') {
+ $locale = app()->bound('config') ?
13
+ app('config')->get('app.faker_locale')
14
+ : 'en_US';
15
}
16
- $locale ??= 'en_US';
-
17
$abstract = \Xefi\Faker\Faker::class.':'.$locale;
18
19
if (! app()->bound($abstract)) {
0 commit comments