Conditions | 1 |
Paths | 1 |
Total Lines | 77 |
Code Lines | 64 |
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 |
||
123 | public function multipleStatementsProvider() |
||
124 | { |
||
125 | return [ |
||
126 | 'AbnSample1' => [ |
||
127 | [ |
||
128 | 'EUR', |
||
129 | 'EUR', |
||
130 | 'EUR', |
||
131 | 'EUR', |
||
132 | ], file_get_contents(__DIR__.'/Engine/Abn/sample'), |
||
133 | ], |
||
134 | 'IngSample1' => [ |
||
135 | [ |
||
136 | 'EUR', |
||
137 | ], file_get_contents(__DIR__.'/Engine/Ing/sample'), |
||
138 | ], |
||
139 | 'KnabSample' => [ |
||
140 | [ |
||
141 | 'EUR', |
||
142 | ], file_get_contents(__DIR__.'/Engine/Knab/sample'), |
||
143 | ], |
||
144 | 'SpkSample' => [ |
||
145 | [ |
||
146 | 'EUR', |
||
147 | 'EUR', |
||
148 | 'EUR', |
||
149 | 'EUR', |
||
150 | ], file_get_contents(__DIR__.'/Engine/Spk/sample'), |
||
151 | ], |
||
152 | 'Triodos' => [ |
||
153 | [ |
||
154 | 'EUR', |
||
155 | 'EUR', |
||
156 | ], file_get_contents(__DIR__.'/Engine/Triodos/sample'), |
||
157 | ], |
||
158 | 'RaboSample1' => [ |
||
159 | [ |
||
160 | 'EUR', |
||
161 | 'EUR', |
||
162 | 'EUR', |
||
163 | 'EUR', |
||
164 | 'EUR', |
||
165 | 'EUR', |
||
166 | 'EUR', |
||
167 | 'EUR', |
||
168 | 'EUR', |
||
169 | 'EUR', |
||
170 | 'EUR', |
||
171 | 'EUR', |
||
172 | 'USD', |
||
173 | 'USD', |
||
174 | 'USD', |
||
175 | 'EUR', |
||
176 | 'EUR', |
||
177 | 'EUR', |
||
178 | 'EUR', |
||
179 | 'EUR', |
||
180 | 'EUR', |
||
181 | 'EUR', |
||
182 | 'EUR', |
||
183 | 'EUR', |
||
184 | 'JPY', |
||
185 | 'JPY', |
||
186 | 'JPY', |
||
187 | 'USD', |
||
188 | 'USD', |
||
189 | 'USD', |
||
190 | 'EUR', |
||
191 | 'EUR', |
||
192 | 'EUR', |
||
193 | 'EUR', |
||
194 | 'EUR', |
||
195 | 'EUR', |
||
196 | 'EUR', |
||
197 | 'EUR', |
||
198 | 'EUR', |
||
199 | ], file_get_contents(__DIR__.'/Engine/Rabo/sample'), |
||
200 | ], |
||
205 |