Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | protected function getMigrationFileName(Filesystem $filesystem): string |
||
24 | { |
||
25 | $timestamp = date('Y_m_d_His'); |
||
26 | |||
27 | return Collection::make($this->app->databasePath().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR) |
||
|
|||
28 | ->flatMap(function ($path) use ($filesystem) { |
||
29 | return $filesystem->glob($path.'*_add_fullname_to_users_table.php'); |
||
30 | })->push($this->app->databasePath()."/migrations/{$timestamp}_add_fullname_to_users_table.php") |
||
31 | ->first(); |
||
32 | } |
||
33 | } |
||
34 |
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: