| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function up() |
||
| 14 | { |
||
| 15 | 152 | Schema::create('preferences', function (Blueprint $table) { |
|
| 16 | 152 | $table->increments('id'); |
|
| 17 | 152 | $table->string('key'); |
|
| 18 | 152 | $table->string('value'); |
|
| 19 | 152 | $table->enum('type', ['string', 'bool', 'int', 'float', 'array', 'time', 'json'])->default('string'); |
|
| 20 | 152 | $table->string('preferenceable_type'); |
|
| 21 | 152 | $table->integer('preferenceable_id')->unsigned(); |
|
| 22 | 152 | $table->nullableTimestamps(); |
|
| 23 | |||
| 24 | 152 | $table->unique(['key', 'preferenceable_type', 'preferenceable_id']); |
|
| 25 | 152 | }); |
|
| 26 | 152 | } |
|
| 27 | |||
| 38 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.