Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Lines | 10 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
10 | public function up() |
||
11 | { |
||
12 | Schema::create(config('phptelegrambot.database.prefix', '') . 'shipping_query', static function (Blueprint $table) { |
||
13 | $table->bigInteger('id')->primary()->unsigned()->comment('Unique query identifier'); |
||
14 | $table->bigInteger('user_id')->index('user_id')->nullable()->comment('User who sent the query'); |
||
15 | $table->char ('invoice_payload', 255)->default('')->comment ('Bot specified invoice payload'); |
||
16 | $table->char ('shipping_address', 255)->default('')->comment ('User specified shipping address'); |
||
17 | $table->timestamp('created_at')->nullable()->comment ('Entry date creation'); |
||
18 | }); |
||
19 | } |
||
20 | |||
26 |
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.