| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function up() |
||
| 16 | { |
||
| 17 | $twoStepAuth = new TwoStepAuth(); |
||
| 18 | $connection = $twoStepAuth->getConnectionName(); |
||
| 19 | $table = $twoStepAuth->getTableName(); |
||
| 20 | $tableCheck = Schema::connection($connection)->hasTable($table); |
||
| 21 | |||
| 22 | if (! $tableCheck) { |
||
| 23 | Schema::connection($connection)->create($table, function (Blueprint $table) { |
||
| 24 | $table->increments('id'); |
||
| 25 | $table->unsignedBigInteger('userId')->unsigned()->index(); |
||
| 26 | $table->foreign('userId')->references('id')->on('users')->onDelete('cascade'); |
||
| 27 | $table->string('authCode')->nullable(); |
||
| 28 | $table->integer('authCount'); |
||
| 29 | $table->boolean('authStatus')->default(false); |
||
| 30 | $table->dateTime('authDate')->nullable(); |
||
| 31 | $table->dateTime('requestDate')->nullable(); |
||
| 32 | $table->timestamps(); |
||
| 33 | }); |
||
| 51 |
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.