Total Complexity | 2 |
Total Lines | 16 |
Duplicated Lines | 100 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
1 | <?php |
||
6 | class CreateProfiles extends Migration |
||
7 | { |
||
8 | public function up() |
||
9 | { |
||
10 | Schema::create('profiles', function (Blueprint $table) { |
||
11 | $table->increments('id'); |
||
12 | $table->unsignedInteger('author_id'); |
||
13 | $table->timestamps(); |
||
14 | |||
15 | $table->text('first_name'); |
||
16 | $table->text('last_name'); |
||
17 | }); |
||
18 | } |
||
19 | |||
20 | public function down() |
||
21 | { |
||
22 | // |
||
25 |