Test Failed
Push — master ( d5ae66...2b482c )
by archer
02:04
created

CreateArcherZdipAppClientsTable::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
use Illuminate\Support\Facades\DB;
0 ignored issues
show
Bug introduced by
The type Illuminate\Support\Facades\DB 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...
4
use Illuminate\Support\Facades\Schema;
0 ignored issues
show
Bug introduced by
The type Illuminate\Support\Facades\Schema 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...
5
use Illuminate\Database\Schema\Blueprint;
0 ignored issues
show
Bug introduced by
The type Illuminate\Database\Schema\Blueprint 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
use Illuminate\Database\Migrations\Migration;
0 ignored issues
show
Bug introduced by
The type Illuminate\Database\Migrations\Migration 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...
7
8
class CreateArcherZdipAppClientsTable extends Migration
9
{
10
    /**
11
     * Run the migrations.
12
     *
13
     * @return void
14
     */
15
    public function up()
16
    {
17
        $tableName = config('apikey.table_name.app_clients');
0 ignored issues
show
Bug introduced by
The function config 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
        $tableName = /** @scrutinizer ignore-call */ config('apikey.table_name.app_clients');
Loading history...
18
19
        Schema::create($tableName, function (Blueprint $table) {
20
            $table->increments('id');
21
            $table->string('name')->comment('AppName');
22
            $table->string('appid')->comment('Appid');
23
            $table->string('secret')->comment('AppSecret');
24
            $table->boolean('active')->default(1)->comment('Active 0-DeActive 1-Active');
25
            $table->timestamps();
26
            $table->softDeletes();
27
            $table->index('appid');
28
            $table->index('secret');
29
        });
30
31
        DB::statement("ALTER TABLE `{$tableName}` comment 'AppClients'");
32
    }
33
34
    /**
35
     * Reverse the migrations.
36
     *
37
     * @return void
38
     */
39
    public function down()
40
    {
41
        $tableName = config('apikey.table_name.app_clients');
0 ignored issues
show
Bug introduced by
The function config 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

41
        $tableName = /** @scrutinizer ignore-call */ config('apikey.table_name.app_clients');
Loading history...
42
43
        Schema::dropIfExists($tableName);
44
    }
45
}
46