Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Lines | 16 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
23 | public function up() |
||
24 | { |
||
25 | Schema::create('ledger', function (Blueprint $table) { |
||
26 | $table->bigIncrements('id'); |
||
27 | $table->string('transaction_id'); |
||
28 | $table->string('transaction_type'); // exp or inc |
||
29 | $table->string('transaction_type_category'); |
||
30 | $table->integer('amount'); |
||
31 | $table->integer('balance')->default(); // always gets deducted when expense is added optinal |
||
32 | |||
33 | |||
34 | |||
35 | |||
36 | $table->timestamps(); |
||
37 | }); |
||
38 | } |
||
39 | |||
50 |
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.