Completed
Push — master ( 21c269...ab9b64 )
by Manu
01:57
created

CreateInventoryObjectsTable::up()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 27
Code Lines 22

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 27
rs 8.8571
c 0
b 0
f 0
cc 1
eloc 22
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
class CreateInventoryObjectsTable extends Migration
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('inventory_objects', function (Blueprint $table) {
0 ignored issues
show
Bug introduced by
The method create() does not exist on Illuminate\Support\Facades\Schema. Did you maybe mean createFreshMockInstance()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
17
18
            $table->increments('id');
19
            $table->integer('id_public');
20
            $table->integer('id_extern');
21
            $table->string('tipus');
22
            $table->string('name');
23
            $table->string('description');
24
            $table->integer('parent_object_id');
25
            $table->integer('material_type_id');
26
            $table->integer('brand_id');
27
            $table->integer('model_id');
28
            $table->integer('location_id');
29
            $table->string('quantity');
30
            $table->string('price');
31
            $table->integer('money_source_id');
32
            $table->integer('provider_id');
33
            $table->string('preservation_state');
34
            $table->integer('study_id');
35
            $table->integer('mainOrganizationalUnitId');
36
            $table->userstamps();
0 ignored issues
show
Bug introduced by
The method userstamps() does not seem to exist on object<Illuminate\Database\Schema\Blueprint>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
37
            $table->timestamps();
38
39
        });
40
    }
41
42
    /**
43
     * Reverse the migrations.
44
     *
45
     * @return void
46
     */
47
    public function down()
48
    {
49
        Schema::dropIfExists('inventory_objects');
50
    }
51
}
52