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', '') . 'poll_answer', static function (Blueprint $table) { |
||
13 | $table->bigInteger('poll_id')->unsigned()->comment('Unique poll identifier'); |
||
14 | $table->bigInteger('user_id')->comment('The user, who changed the answer to the poll'); |
||
15 | $table->text ('option_ids')->comment ('0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.'); |
||
16 | $table->timestamp('created_at')->nullable()->comment ('Entry date creation'); |
||
17 | $table->primary (['poll_id', 'user_id']); |
||
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.