Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public function setUp() |
||
13 | { |
||
14 | parent::setUp(); |
||
15 | |||
16 | $this->loadLaravelMigrations(['--database' => 'testing']); |
||
17 | $this->loadMigrationsFrom([ |
||
18 | '--database' => 'testing', |
||
19 | '--path' => '../../../../tests/migrations' |
||
20 | ]); |
||
21 | $this->faker = Factory::create(); |
||
|
|||
22 | $this->user = User::create([ |
||
23 | 'name' => $this->faker->name, |
||
24 | 'email' => $this->faker->email, |
||
25 | 'password' => $this->faker->password, |
||
26 | ]); |
||
27 | } |
||
28 | |||
41 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: