Conditions | 1 |
Paths | 1 |
Total Lines | 123 |
Code Lines | 121 |
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 |
||
101 | private function ansi24part1(): Traversable |
||
102 | { |
||
103 | yield from [ |
||
104 | '255;0;0', |
||
105 | '255;4;0', |
||
106 | '255;8;0', |
||
107 | '255;12;0', |
||
108 | '255;16;0', |
||
109 | '255;21;0', |
||
110 | '255;25;0', |
||
111 | '255;29;0', |
||
112 | '255;33;0', |
||
113 | '255;38;0', |
||
114 | '255;42;0', |
||
115 | '255;46;0', |
||
116 | '255;50;0', |
||
117 | '255;55;0', |
||
118 | '255;59;0', |
||
119 | '255;63;0', |
||
120 | '255;67;0', |
||
121 | '255;72;0', |
||
122 | '255;76;0', |
||
123 | '255;80;0', |
||
124 | '255;84;0', |
||
125 | '255;89;0', |
||
126 | '255;93;0', |
||
127 | '255;97;0', |
||
128 | '255;102;0', |
||
129 | '255;106;0', |
||
130 | '255;110;0', |
||
131 | '255;114;0', |
||
132 | '255;119;0', |
||
133 | '255;123;0', |
||
134 | '255;127;0', |
||
135 | '255;131;0', |
||
136 | '255;136;0', |
||
137 | '255;140;0', |
||
138 | '255;144;0', |
||
139 | '255;148;0', |
||
140 | '255;153;0', |
||
141 | '255;157;0', |
||
142 | '255;161;0', |
||
143 | '255;165;0', |
||
144 | '255;170;0', |
||
145 | '255;174;0', |
||
146 | '255;178;0', |
||
147 | '255;182;0', |
||
148 | '255;187;0', |
||
149 | '255;191;0', |
||
150 | '255;195;0', |
||
151 | '255;199;0', |
||
152 | '255;204;0', |
||
153 | '255;208;0', |
||
154 | '255;212;0', |
||
155 | '255;216;0', |
||
156 | '255;220;0', |
||
157 | '255;225;0', |
||
158 | '255;229;0', |
||
159 | '255;233;0', |
||
160 | '255;238;0', |
||
161 | '255;242;0', |
||
162 | '255;246;0', |
||
163 | '255;250;0', |
||
164 | '255;255;0', |
||
165 | '250;255;0', |
||
166 | '246;255;0', |
||
167 | '242;255;0', |
||
168 | '238;255;0', |
||
169 | '233;255;0', |
||
170 | '229;255;0', |
||
171 | '225;255;0', |
||
172 | '221;255;0', |
||
173 | '216;255;0', |
||
174 | '212;255;0', |
||
175 | '208;255;0', |
||
176 | '203;255;0', |
||
177 | '199;255;0', |
||
178 | '195;255;0', |
||
179 | '191;255;0', |
||
180 | '187;255;0', |
||
181 | '182;255;0', |
||
182 | '178;255;0', |
||
183 | '174;255;0', |
||
184 | '170;255;0', |
||
185 | '165;255;0', |
||
186 | '161;255;0', |
||
187 | '157;255;0', |
||
188 | '153;255;0', |
||
189 | '148;255;0', |
||
190 | '144;255;0', |
||
191 | '140;255;0', |
||
192 | '136;255;0', |
||
193 | '131;255;0', |
||
194 | '127;255;0', |
||
195 | '123;255;0', |
||
196 | '119;255;0', |
||
197 | '114;255;0', |
||
198 | '110;255;0', |
||
199 | '106;255;0', |
||
200 | '101;255;0', |
||
201 | '97;255;0', |
||
202 | '93;255;0', |
||
203 | '89;255;0', |
||
204 | '84;255;0', |
||
205 | '80;255;0', |
||
206 | '76;255;0', |
||
207 | '72;255;0', |
||
208 | '68;255;0', |
||
209 | '63;255;0', |
||
210 | '59;255;0', |
||
211 | '55;255;0', |
||
212 | '51;255;0', |
||
213 | '46;255;0', |
||
214 | '42;255;0', |
||
215 | '38;255;0', |
||
216 | '33;255;0', |
||
217 | '29;255;0', |
||
218 | '25;255;0', |
||
219 | '21;255;0', |
||
220 | '16;255;0', |
||
221 | '12;255;0', |
||
222 | '8;255;0', |
||
223 | '4;255;0', |
||
224 | ]; |
||
485 |