Conditions | 1 |
Paths | 1 |
Total Lines | 69 |
Code Lines | 57 |
Lines | 0 |
Ratio | 0 % |
Changes | 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 |
||
11 | protected function getResolveArray(){ |
||
12 | $xtypes = [ |
||
13 | '\Ext\Grid\Column\Widget' => ['xtype'=>'widgetcolumn'], |
||
14 | '\Ext\Grid\Column\Template' => ['xtype'=>'templatecolumn'], |
||
15 | '\Ext\Grid\Column\RowNumbener' => ['xtype'=>'rownumberer'], |
||
16 | '\Ext\Grid\Column\Number' => ['xtype'=>'numbercolumn'], |
||
17 | '\Ext\Grid\Column\Date' => ['xtype'=>'datecolumn'], |
||
18 | '\Ext\Grid\Column\Action' => ['xtype'=>'actioncolumn'], |
||
19 | '\Ext\Grid\Column\Boolean' => ['xtype'=>'booleancolumn'], |
||
20 | '\Ext\Grid\Column\Column' => ['xtype'=>'gridcolumn'], |
||
21 | |||
22 | '\Ext\Button\Button' => ['xtype'=>'button'], |
||
23 | '\Ext\Panel\Tool' => ['xtype'=>'tool'], |
||
24 | '\Ext\Panel\Header' => ['xtype'=>'header'], |
||
25 | |||
26 | '\Ext\Form\RadioGroup' => ['xtype'=>'radiogroup'], |
||
27 | '\Ext\Form\CheckboxGroup' => ['xtype'=>'checkboxgroup'], |
||
28 | '\Ext\Form\Label' => ['xtype'=>'checkboxgroup'], |
||
29 | '\Ext\Form\Field\TextArea' => ['xtype'=>'textarea'], |
||
30 | '\Ext\Form\Field\Radio' => ['xtype'=>'radio'], |
||
31 | '\Ext\Form\Field\Hidden' => ['xtype'=>'hidden'], |
||
32 | '\Ext\Form\Field\File' => ['xtype'=>'filefield'], |
||
33 | '\Ext\Form\Field\Number' => ['xtype'=>'numberfield'], |
||
34 | '\Ext\Form\Field\Display' => ['xtype'=>'displayfield'], |
||
35 | '\Ext\Form\Field\Date' => ['xtype'=>'datefield'], |
||
36 | '\Ext\Form\Field\ComboBox' => ['xtype'=>'combobox'], |
||
37 | '\Ext\Form\Field\Checkbox' => ['xtype'=>'checkbox'], |
||
38 | '\Ext\Form\Field\Text' => ['xtype'=>'textfield'], |
||
39 | |||
40 | '\Ext\Window\Toast' => ['xtype'=>'toast'], |
||
41 | '\Ext\Window\Window' => ['xtype'=>'window'], |
||
42 | |||
43 | '\Ext\Form\Panel' => ['xtype'=>'form'], |
||
44 | '\Ext\Grid\Panel' => ['xtype'=>'grid'], |
||
45 | '\Ext\Panel\Table' => ['xtype'=>'tablepanel'], |
||
46 | '\Ext\Panel\Panel' => ['xtype'=>'panel'], |
||
47 | |||
48 | '\Ext\Form\FieldContainer' => ['xtype'=>'fieldcontainer'], |
||
49 | '\Ext\Form\FieldSet' => ['xtype'=>'fieldset'], |
||
50 | '\Ext\Toolbar\Paging' => ['xtype'=>'pagingtoolbar'], |
||
51 | '\Ext\Toolbar\Toolbar' => ['xtype'=>'toolbar'], |
||
52 | '\Ext\Grid\Header\Container' => ['xtype'=>'headercontainer'], |
||
53 | '\Ext\Container\Viewport' => ['xtype'=>'viewport'], |
||
54 | |||
55 | '\Ext\Container\Container'=>['xtype'=>'container'], |
||
56 | '\Ext\Component' =>['xtype'=>'component'], |
||
57 | ]; |
||
58 | $proxies =[ |
||
59 | '\Ext\Data\Proxy\Ajax' => ['type'=>'ajax'], |
||
60 | '\Ext\Data\Proxy\Server' => ['type'=>'server'] |
||
61 | ]; |
||
62 | $readers = [ |
||
63 | '\Ext\Data\Reader\Json' => ['type'=>'json'], |
||
64 | '\Ext\Data\Reader\Reader' => ['type'=>'base'], |
||
65 | ]; |
||
66 | $plugins = [ |
||
67 | '\Ext\Grid\Filters\Filters' => ['ptype'=>'gridfilters'], |
||
68 | '\Ext\Grid\Filters\Filter\Boolean' => ['type'=>'boolean'], |
||
69 | '\Ext\Grid\Filters\Filter\Date' => ['type'=>'date'], |
||
70 | '\Ext\Grid\Filters\Filter\Enum' => ['type'=>'list'], |
||
71 | '\Ext\Grid\Filters\Filter\Number' => ['type'=>'number'], |
||
72 | '\Ext\Grid\Filters\Filter\String' => ['type'=>'string'], |
||
73 | ]; |
||
74 | $stores = [ |
||
75 | '\Ext\Data\ArrayStore' => ['store'=>'array'], |
||
76 | '\Ext\Data\Store' => ['store'=>'store'], |
||
77 | ]; |
||
78 | return $xtypes+$readers+ $proxies+$plugins+$stores; |
||
79 | } |
||
80 | |||
89 | } |