Conditions | 1 |
Paths | 1 |
Total Lines | 123 |
Code Lines | 93 |
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 |
||
61 | public function simpleDataProvider():array |
||
62 | { |
||
63 | return [ |
||
64 | [ |
||
65 | [ |
||
66 | 1512570360, |
||
67 | 1512571380, |
||
68 | 1512572340, |
||
69 | 1512573360, |
||
70 | 1512574380, |
||
71 | 1512575340, |
||
72 | 1512576360, |
||
73 | 1512577380, |
||
74 | 1512578340, |
||
75 | 1512579360, |
||
76 | 1512585360, |
||
77 | 1512586380, |
||
78 | 1512587340, |
||
79 | 1512588360, |
||
80 | 1512589380, |
||
81 | ], |
||
82 | RESOLUTION_01min |
||
83 | ], |
||
84 | [ |
||
85 | [ |
||
86 | 1512570240, |
||
87 | 1512571320, |
||
88 | 1512572220, |
||
89 | 1512573300, |
||
90 | 1512574380, |
||
91 | 1512575280, |
||
92 | 1512576360, |
||
93 | 1512577260, |
||
94 | 1512578340, |
||
95 | 1512579240, |
||
96 | 1512585360, |
||
97 | 1512586260, |
||
98 | 1512587340, |
||
99 | 1512588240, |
||
100 | 1512589320, |
||
101 | ], |
||
102 | RESOLUTION_03min |
||
103 | ], |
||
104 | [ |
||
105 | [ |
||
106 | 1512570300, |
||
107 | 1512571200, |
||
108 | 1512572100, |
||
109 | 1512573300, |
||
110 | 1512574200, |
||
111 | 1512575100, |
||
112 | 1512576300, |
||
113 | 1512577200, |
||
114 | 1512578100, |
||
115 | 1512579300, |
||
116 | 1512585300, |
||
117 | 1512586200, |
||
118 | 1512587100, |
||
119 | 1512588300, |
||
120 | 1512589200, |
||
121 | ], |
||
122 | RESOLUTION_05min |
||
123 | ], |
||
124 | [ |
||
125 | [ |
||
126 | 1512569700, |
||
127 | 1512570600, |
||
128 | 1512571500, |
||
129 | 1512573300, |
||
130 | 1512574200, |
||
131 | 1512575100, |
||
132 | 1512576000, |
||
133 | 1512576900, |
||
134 | 1512577800, |
||
135 | 1512578700, |
||
136 | 1512585000, |
||
137 | 1512585900, |
||
138 | 1512586800, |
||
139 | 1512587700, |
||
140 | 1512588600, |
||
141 | ], |
||
142 | RESOLUTION_15min |
||
143 | ], |
||
144 | [ |
||
145 | [ |
||
146 | 1512568800, |
||
147 | 1512570600, |
||
148 | 1512572400, |
||
149 | 1512574200, |
||
150 | 1512576000, |
||
151 | 1512577800, |
||
152 | 1512585000, |
||
153 | 1512586800, |
||
154 | 1512588600, |
||
155 | ], |
||
156 | RESOLUTION_30min |
||
157 | ], |
||
158 | [ |
||
159 | [ |
||
160 | 1512569700, |
||
161 | 1512572400, |
||
162 | 1512575100, |
||
163 | 1512577800, |
||
164 | 1512583200, |
||
165 | 1512585900, |
||
166 | 1512588600, |
||
167 | ], |
||
168 | RESOLUTION_45min |
||
169 | ], |
||
170 | [ |
||
171 | [ |
||
172 | 1512568800, |
||
173 | 1512572400, |
||
174 | 1512576000, |
||
175 | 1512583200, |
||
176 | 1512586800, |
||
177 | ], |
||
178 | RESOLUTION_01hour |
||
179 | ], |
||
180 | [[1512568800, 1512576000,1512583200], RESOLUTION_02hour], |
||
181 | [[1512561600, 1512572400,1512583200], RESOLUTION_03hour], |
||
182 | [[1512561600,1512576000], RESOLUTION_04hour], |
||
183 | [[1512518400], RESOLUTION_01day], |
||
184 | ]; |
||
188 | } |