AddNullableToTrackerError   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 36
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A migrateUp() 0 12 2
A migrateDown() 0 3 1
1
<?php
2
3
use PragmaRX\Tracker\Support\Migration;
4
5
class AddNullableToTrackerError extends Migration
6
{
7
    /**
8
     * Table related to this migration.
9
     *
10
     * @var string
11
     */
12
    private $table = 'tracker_errors';
13
14
    /**
15
     * Run the migrations.
16
     *
17
     * @return void
18
     */
19
    public function migrateUp()
20
    {
21
        try {
22
            $this->builder->table(
23
                $this->table,
24
                function ($table) {
25
                    $table->string('code')->nullable()->change();
26
                }
27
            );
28
        } catch (\Exception $e) {
0 ignored issues
show
Coding Style Comprehensibility introduced by
Consider adding a comment why this CATCH block is empty.
Loading history...
29
        }
30
    }
31
32
    /**
33
     * Reverse the migrations.
34
     *
35
     * @return void
36
     */
37
    public function migrateDown()
38
    {
39
    }
40
}
41