CreateLogsTables::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 25

Duplication

Lines 16
Ratio 64 %

Importance

Changes 0
Metric Value
dl 16
loc 25
rs 9.52
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
8
class CreateLogsTables extends Migration
9
{
10
    /**
11
     * Run the migrations.
12
     *
13
     * @return void
14
     */
15
    public function up()
16
    {
17
18
        Schema::create(
19 View Code Duplication
            'logs', function (Blueprint $table) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
20
                $table->increments('id');
21
                $table->string('name');
22
                $table->string('slug'); // Classe Gateway que pertence
23
                $table->string('description')->nullable();
24
                $table->integer('status');
25
                $table->timestamps();
26
            }
27
        );
28
29
        Schema::create(
30 View Code Duplication
            'audits', function (Blueprint $table) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
31
                $table->increments('id');
32
                $table->string('route')->nullable();
33
                $table->string('business')->nullable();
34
                $table->string('user')->nullable();
35
                $table->longText('data')->nullable();
36
                $table->timestamps();
37
            }
38
        );
39
    }
40
    /**
41
     * Reverse the migrations.
42
     *
43
     * @return void
44
     */
45
    public function down()
46
    {
47
        Schema::dropIfExists('logs');
48
    }
49
}
50