| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 61 | 
| Code Lines | 48 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php  | 
            ||
| 14 | public function up()  | 
            ||
| 15 |     { | 
            ||
| 16 |         Schema::create('content', function (Blueprint $table) { | 
            ||
| 17 |             $table->increments('id'); | 
            ||
| 18 |             $table->boolean('active')->default(false);             | 
            ||
| 19 |             $table->string('title')->nullable(); | 
            ||
| 20 |             $table->text('short_description')->nullable(); | 
            ||
| 21 |             $table->text('content')->nullable(); | 
            ||
| 22 |             $table->string('meta_title')->nullable(); | 
            ||
| 23 |             $table->string('meta_description')->nullable(); | 
            ||
| 24 |             $table->string('meta_keywords')->nullable(); | 
            ||
| 25 |             $table->string('slug'); | 
            ||
| 26 |             $table->integer('shop_id')->unsigned()->nullable(); | 
            ||
| 27 |             $table->foreign('shop_id')->references('id')->on('shop')->onDelete('cascade'); | 
            ||
| 28 |             $table->integer('modified_by_user_id')->unsigned()->nullable(); | 
            ||
| 29 |             $table->foreign('modified_by_user_id')->references('id')->on('user')->onDelete('set null'); | 
            ||
| 30 | $table->timestamps();  | 
            ||
| 31 |             $table->unique(array('title','shop_id'), 'unique_content_title'); | 
            ||
| 32 | });  | 
            ||
| 33 | |||
| 34 |         Schema::create('content_image', function (Blueprint $table) { | 
            ||
| 35 |             $table->increments('id'); | 
            ||
| 36 |             $table->integer('content_id')->unsigned(); | 
            ||
| 37 |             $table->foreign('content_id')->references('id')->on('content')->onDelete('cascade'); | 
            ||
| 38 | ;  | 
            ||
| 39 |             $table->string('file')->nullable(); | 
            ||
| 40 |             $table->string('path')->nullable(); | 
            ||
| 41 |             $table->integer('size')->nullable(); | 
            ||
| 42 |             $table->string('extension')->nullable(); | 
            ||
| 43 |             $table->integer('rank')->default(0); | 
            ||
| 44 |             $table->string('tag')->nullable(); | 
            ||
| 45 |             $table->integer('modified_by_user_id')->unsigned()->nullable(); | 
            ||
| 46 |             $table->foreign('modified_by_user_id')->references('id')->on('user')->onDelete('set null'); | 
            ||
| 47 | $table->timestamps();  | 
            ||
| 48 | });  | 
            ||
| 49 | |||
| 50 | // Creates the users table  | 
            ||
| 51 |         Schema::create('content_group', function ($table) { | 
            ||
| 52 |             $table->increments('id'); | 
            ||
| 53 |             $table->boolean('active')->default(false); | 
            ||
| 54 |             $table->integer('rank')->default(0); | 
            ||
| 55 |             $table->string('title'); | 
            ||
| 56 |             $table->string('tag')->nullable(); | 
            ||
| 57 |             $table->string('meta_title')->nullable(); | 
            ||
| 58 |             $table->string('meta_description')->nullable(); | 
            ||
| 59 |             $table->string('meta_keywords')->nullable(); | 
            ||
| 60 | |||
| 61 |             $table->integer('shop_id')->unsigned(); | 
            ||
| 62 |             $table->foreign('shop_id')->references('id')->on('shop')->onDelete('cascade'); | 
            ||
| 63 | |||
| 64 |             $table->string('slug'); | 
            ||
| 65 |             $table->integer('modified_by_user_id')->unsigned()->nullable(); | 
            ||
| 66 |             $table->foreign('modified_by_user_id')->references('id')->on('user')->onDelete('set null'); | 
            ||
| 67 |             $table->unique(array('title','shop_id'), 'unique_content_group_title'); | 
            ||
| 68 | $table->timestamps();  | 
            ||
| 69 | });  | 
            ||
| 70 | |||
| 71 | |||
| 72 |         Schema::table('content', function (Blueprint $table) { | 
            ||
| 73 |             $table->integer('content_group_id')->unsigned()->nullable(); | 
            ||
| 74 |             $table->foreign('content_group_id', 'c_content_group_id_fk')->references('id')->on('content_group')->onDelete('set null'); | 
            ||
| 75 | });  | 
            ||
| 90 |