Conditions | 1 |
Paths | 1 |
Total Lines | 96 |
Code Lines | 93 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
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 |
||
49 | public static function getAll() |
||
50 | { |
||
51 | return array( |
||
52 | 'ptgExp' => 0x01, |
||
53 | 'ptgTbl' => 0x02, |
||
54 | 'ptgAdd' => 0x03, |
||
55 | 'ptgSub' => 0x04, |
||
56 | 'ptgMul' => 0x05, |
||
57 | 'ptgDiv' => 0x06, |
||
58 | 'ptgPower' => 0x07, |
||
59 | 'ptgConcat' => 0x08, |
||
60 | 'ptgLT' => 0x09, |
||
61 | 'ptgLE' => 0x0A, |
||
62 | 'ptgEQ' => 0x0B, |
||
63 | 'ptgGE' => 0x0C, |
||
64 | 'ptgGT' => 0x0D, |
||
65 | 'ptgNE' => 0x0E, |
||
66 | 'ptgIsect' => 0x0F, |
||
67 | 'ptgUnion' => 0x10, |
||
68 | 'ptgRange' => 0x11, |
||
69 | 'ptgUplus' => 0x12, |
||
70 | 'ptgUminus' => 0x13, |
||
71 | 'ptgPercent' => 0x14, |
||
72 | 'ptgParen' => 0x15, |
||
73 | 'ptgMissArg' => 0x16, |
||
74 | 'ptgStr' => 0x17, |
||
75 | 'ptgAttr' => 0x19, |
||
76 | 'ptgSheet' => 0x1A, |
||
77 | 'ptgEndSheet' => 0x1B, |
||
78 | 'ptgErr' => 0x1C, |
||
79 | 'ptgBool' => 0x1D, |
||
80 | 'ptgInt' => 0x1E, |
||
81 | 'ptgNum' => 0x1F, |
||
82 | 'ptgArray' => 0x20, |
||
83 | 'ptgFunc' => 0x21, |
||
84 | 'ptgFuncVar' => 0x22, |
||
85 | 'ptgName' => 0x23, |
||
86 | 'ptgRef' => 0x24, |
||
87 | 'ptgArea' => 0x25, |
||
88 | 'ptgMemArea' => 0x26, |
||
89 | 'ptgMemErr' => 0x27, |
||
90 | 'ptgMemNoMem' => 0x28, |
||
91 | 'ptgMemFunc' => 0x29, |
||
92 | 'ptgRefErr' => 0x2A, |
||
93 | 'ptgAreaErr' => 0x2B, |
||
94 | 'ptgRefN' => 0x2C, |
||
95 | 'ptgAreaN' => 0x2D, |
||
96 | 'ptgMemAreaN' => 0x2E, |
||
97 | 'ptgNameX' => 0x39, |
||
98 | 'ptgRef3d' => 0x3A, |
||
99 | 'ptgArea3d' => 0x3B, |
||
100 | 'ptgRefErr3d' => 0x3C, |
||
101 | 'ptgArrayV' => 0x40, |
||
102 | 'ptgFuncV' => 0x41, |
||
103 | 'ptgFuncVarV' => 0x42, |
||
104 | 'ptgNameV' => 0x43, |
||
105 | 'ptgRefV' => 0x44, |
||
106 | 'ptgAreaV' => 0x45, |
||
107 | 'ptgMemAreaV' => 0x46, |
||
108 | 'ptgMemErrV' => 0x47, |
||
109 | 'ptgMemNoMemV' => 0x48, |
||
110 | 'ptgMemFuncV' => 0x49, |
||
111 | 'ptgRefErrV' => 0x4A, |
||
112 | 'ptgAreaErrV' => 0x4B, |
||
113 | 'ptgRefNV' => 0x4C, |
||
114 | 'ptgAreaNV' => 0x4D, |
||
115 | 'ptgMemAreaNV' => 0x4E, |
||
116 | 'ptgFuncCEV' => 0x58, |
||
117 | 'ptgNameXV' => 0x59, |
||
118 | 'ptgRef3dV' => 0x5A, |
||
119 | 'ptgArea3dV' => 0x5B, |
||
120 | 'ptgRefErr3dV' => 0x5C, |
||
121 | 'ptgArrayA' => 0x60, |
||
122 | 'ptgFuncA' => 0x61, |
||
123 | 'ptgFuncVarA' => 0x62, |
||
124 | 'ptgNameA' => 0x63, |
||
125 | 'ptgRefA' => 0x64, |
||
126 | 'ptgAreaA' => 0x65, |
||
127 | 'ptgMemAreaA' => 0x66, |
||
128 | 'ptgMemErrA' => 0x67, |
||
129 | 'ptgMemNoMemA' => 0x68, |
||
130 | 'ptgMemFuncA' => 0x69, |
||
131 | 'ptgRefErrA' => 0x6A, |
||
132 | 'ptgAreaErrA' => 0x6B, |
||
133 | 'ptgRefNA' => 0x6C, |
||
134 | 'ptgAreaNA' => 0x6D, |
||
135 | 'ptgMemAreaNA' => 0x6E, |
||
136 | 'ptgMemNoMemN' => 0x6F, |
||
137 | 'ptgFuncCEA' => 0x78, |
||
138 | 'ptgNameXA' => 0x79, |
||
139 | 'ptgRef3dA' => 0x7A, |
||
140 | 'ptgArea3dA' => 0x7B, |
||
141 | 'ptgRefErr3dA' => 0x7C, |
||
142 | 'ptgAreaErr3d' => 0x7D |
||
143 | ); |
||
144 | } |
||
145 | } |
||
146 |