| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 79 | 
| Code Lines | 49 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 4 | ||
| Bugs | 1 | 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  | 
            ||
| 32 | public function getScheme(Builder $builder)  | 
            ||
| 33 |     { | 
            ||
| 34 | return $builder->group([  | 
            ||
| 35 |             'text' => $builder->text()->label('Title'), | 
            ||
| 36 |             'checkbox' => $builder->checkbox()->label('Checkbox'), | 
            ||
| 37 | |||
| 38 | 'choose' => $builder->choose([  | 
            ||
| 39 |                 1 => $builder->radio()->label('Radio 1'), | 
            ||
| 40 |                 2 => $builder->radio()->label('Radio 2'), | 
            ||
| 41 |             ])->label('Choose'), | 
            ||
| 42 | |||
| 43 |             'code' => $builder->code()->label('Code'), | 
            ||
| 44 | |||
| 45 | 'collection' => $builder->collection([  | 
            ||
| 46 |                 'text' => $builder->text()->label('Text'), | 
            ||
| 47 |                 'textarea' => $builder->textarea()->label('Textarea'), | 
            ||
| 48 |             ])->label('Collection'), | 
            ||
| 49 | |||
| 50 | 'collectionMultiple' => $builder->collectionMultiple([  | 
            ||
| 51 | 'text' => [  | 
            ||
| 52 |                     'text' => $builder->text()->label('Text'), | 
            ||
| 53 |                     'textarea' => $builder->textarea()->label('Textarea'), | 
            ||
| 54 | ],  | 
            ||
| 55 | 'image' => [  | 
            ||
| 56 |                     'text' => $builder->imageUpload()->label('Image'), | 
            ||
| 57 | ],  | 
            ||
| 58 |             ])->label('Collection multiple'), | 
            ||
| 59 | |||
| 60 |             'color' => $builder->color()->label('Color'), | 
            ||
| 61 | |||
| 62 |             'date' => $builder->date()->label('Date'), | 
            ||
| 63 | |||
| 64 |             'datetime' => $builder->datetime()->label('Datetime'), | 
            ||
| 65 | |||
| 66 |             'datetimeLocal' => $builder->datetimeLocal()->label('Datetime local'), | 
            ||
| 67 | |||
| 68 |             'email' => $builder->email()->label('Email'), | 
            ||
| 69 | |||
| 70 |             'fileupload' => $builder->fileUpload()->label('File upload'), | 
            ||
| 71 | |||
| 72 |             'html' => $builder->html()->label('Html'), | 
            ||
| 73 | |||
| 74 | 'imageupload' => $builder->imageUpload()  | 
            ||
| 75 |                 ->data('config', [ | 
            ||
| 76 | 'thumb' => 'Entities/img'  | 
            ||
| 77 | ])  | 
            ||
| 78 |                 ->label('Image upload'), | 
            ||
| 79 | |||
| 80 |             'info' => $builder->info()->label('Info'), | 
            ||
| 81 | |||
| 82 | 'loader' => $builder->loader([  | 
            ||
| 83 |                 'field' => $builder->url()->label('Url'), | 
            ||
| 84 |                 'loader' => $builder->text()->label('Text'), | 
            ||
| 85 |                 ])->label('Loader'), | 
            ||
| 86 | |||
| 87 |             'month' => $builder->month()->label('Month'), | 
            ||
| 88 | |||
| 89 |             'number' => $builder->number()->label('Number'), | 
            ||
| 90 | |||
| 91 |             'password' => $builder->password()->label('Password'), | 
            ||
| 92 | |||
| 93 |             'range' => $builder->range()->label('Range'), | 
            ||
| 94 | |||
| 95 | 'select' => $builder->select([  | 
            ||
| 96 | 1 => 'One',  | 
            ||
| 97 | 2 => 'Two',  | 
            ||
| 98 |                 ])->label('Select'), | 
            ||
| 99 | |||
| 100 |             'table' => $builder->table()->label('Table'), | 
            ||
| 101 | |||
| 102 |             'tel' => $builder->tel()->label('Tel'), | 
            ||
| 103 | |||
| 104 |             'time' => $builder->time()->label('Time'), | 
            ||
| 105 | |||
| 106 |             'url' => $builder->url()->label('Url'), | 
            ||
| 107 | |||
| 108 |             'week' => $builder->week()->label('Week'), | 
            ||
| 109 | ]);  | 
            ||
| 110 | }  | 
            ||
| 111 | }  | 
            ||
| 112 |