Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Test Setup Failed
Pull Request — development (#68)
by José
06:06
created

UserFactory::fields()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 20

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 20
rs 9.6
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
namespace GiveBlood\Modules\Users;
4
5
use GiveBlood\Modules\Blood\BloodType;
6
use GiveBlood\Support\Database\ModelFactory;
7
8
/*
9
|--------------------------------------------------------------------------
10
| User Model Factory
11
|--------------------------------------------------------------------------
12
|
13
| This directory should contain each of the model factory definitions for
14
| your application. Factories provide a convenient way to generate new
15
| model instances for testing / seeding your application's database.
16
|
17
*/
18
class UserFactory extends ModelFactory
19
{
20
    protected $model = User::class;
21
22
    protected function fields()
23
    {
24
        static $password;
25
26
        return [
27
        'id' => $this->faker->uuid,
28
        'first_name' => $this->faker->firstName,
29
        'last_name' => $this->faker->lastName,
30
        'email' => $this->faker->unique()->safeEmail,
31
        'email_verified_at' => now(),
32
        'username' => $this->faker->userName(20),
33
        'phone' => $this->faker->tollFreePhoneNumber,
0 ignored issues
show
Bug introduced by
The property tollFreePhoneNumber does not seem to exist. Did you mean phoneNumber?

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
34
        'bio' => $this->faker->text($maxNbChars = 100),
35
        'birthdate' => $this->faker->date,
36
        'country_id' => factory(Country::class)->make()->id,
37
        'blood_type_id' => factory(BloodType::class)->make()->id,
38
        'password' => $password ?: $password = bcrypt('secret'),
39
        'remember_token' => \Str::random(10),
40
        ];
41
    }
42
}
43