Passed
Push — master ( f0ed0e...da797a )
by Gombos
01:32
created

CopyMigrationsCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 13
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 5 1
1
<?php
2
3
namespace Glorand\Model\Settings\Console;
4
5
use Illuminate\Console\Command;
1 ignored issue
show
Bug introduced by
The type Illuminate\Console\Command was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
class CopyMigrationsCommand extends Command
8
{
9
    /** @var string */
10
    protected $signature = 'model-settings:copy-migrations';
11
12
    /** @var string */
13
    protected $description = 'Copy migrations files from package to app\'s migration folder';
14
15
    public function handle()
16
    {
17
        \File::copyDirectory(__DIR__ . '/../../migrations', database_path('migrations'));
1 ignored issue
show
Bug introduced by
The function database_path was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

17
        \File::copyDirectory(__DIR__ . '/../../migrations', /** @scrutinizer ignore-call */ database_path('migrations'));
Loading history...
18
19
        $this->info('Migration files copied successfully.');
20
    }
21
}
22