We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 1 |
Paths | 1 |
Total Lines | 85 |
Code Lines | 59 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
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('comments', function (Blueprint $table) { |
||
17 | $table->bigIncrements('id'); |
||
18 | $table->string('text')->nullable(); |
||
19 | $table->morphs('commentable'); |
||
20 | $table->timestamps(); |
||
21 | }); |
||
22 | |||
23 | Schema::create('recommendables', function (Blueprint $table) { |
||
24 | $table->bigIncrements('id'); |
||
25 | $table->string('text')->nullable(); |
||
26 | $table->morphs('recommendable'); |
||
27 | $table->bigInteger('recommend_id'); |
||
28 | $table->timestamps(); |
||
29 | }); |
||
30 | |||
31 | Schema::create('billables', function (Blueprint $table) { |
||
32 | $table->bigIncrements('id'); |
||
33 | $table->string('text')->nullable(); |
||
34 | $table->morphs('billable'); |
||
35 | $table->bigInteger('bill_id'); |
||
36 | $table->timestamps(); |
||
37 | }); |
||
38 | |||
39 | Schema::create('articles_user', function (Blueprint $table) { |
||
40 | $table->increments('id'); |
||
41 | $table->integer('article_id')->unsigned(); |
||
42 | $table->integer('user_id')->unsigned(); |
||
43 | $table->string('notes'); |
||
44 | $table->nullableTimestamps(); |
||
45 | }); |
||
46 | |||
47 | Schema::create('recommends', function (Blueprint $table) { |
||
48 | $table->bigIncrements('id'); |
||
49 | $table->string('title')->nullable(); |
||
50 | $table->timestamps(); |
||
51 | }); |
||
52 | |||
53 | Schema::create('bills', function (Blueprint $table) { |
||
54 | $table->bigIncrements('id'); |
||
55 | $table->string('title')->nullable(); |
||
56 | $table->timestamps(); |
||
57 | }); |
||
58 | |||
59 | Schema::create('stars', function (Blueprint $table) { |
||
60 | $table->bigIncrements('id'); |
||
61 | $table->string('starable_type'); |
||
62 | $table->bigInteger('starable_id'); |
||
63 | $table->string('title')->nullable(); |
||
64 | }); |
||
65 | |||
66 | Schema::create('universes', function (Blueprint $table) { |
||
67 | $table->bigIncrements('id'); |
||
68 | $table->bigInteger('user_id'); |
||
69 | $table->string('title')->nullable(); |
||
70 | }); |
||
71 | |||
72 | Schema::create('planets', function (Blueprint $table) { |
||
73 | $table->bigIncrements('id'); |
||
74 | $table->bigInteger('user_id')->nullable(); |
||
75 | $table->string('title')->nullable(); |
||
76 | }); |
||
77 | |||
78 | Schema::create('comets', function (Blueprint $table) { |
||
79 | $table->bigIncrements('id'); |
||
80 | $table->bigInteger('user_id')->default(0); |
||
81 | }); |
||
82 | |||
83 | Schema::create('bangs', function (Blueprint $table) { |
||
84 | $table->bigIncrements('id'); |
||
85 | $table->string('name'); |
||
86 | }); |
||
87 | |||
88 | Schema::create('account_details_bang', function (Blueprint $table) { |
||
89 | $table->bigIncrements('id'); |
||
90 | $table->bigInteger('account_details_id'); |
||
91 | $table->bigInteger('bang_id'); |
||
92 | }); |
||
93 | |||
94 | Schema::create('account_details_bangs_pivot', function (Blueprint $table) { |
||
95 | $table->bigIncrements('id'); |
||
96 | $table->bigInteger('account_details_id'); |
||
97 | $table->bigInteger('bang_id'); |
||
98 | $table->string('pivot_field'); |
||
99 | }); |
||
119 |