Conditions | 1 |
Paths | 1 |
Total Lines | 91 |
Code Lines | 89 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | 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 |
||
128 | public function getFieldTypes() { |
||
129 | return array( |
||
130 | 'account_id' => 'string', |
||
131 | 'account_name' => 'string', |
||
132 | 'action_values' => 'list<AdsActionStats>', |
||
133 | 'actions' => 'list<AdsActionStats>', |
||
134 | 'ad_id' => 'string', |
||
135 | 'ad_name' => 'string', |
||
136 | 'adset_id' => 'string', |
||
137 | 'adset_name' => 'string', |
||
138 | 'age' => 'string', |
||
139 | 'app_store_clicks' => 'unsigned int', |
||
140 | 'buying_type' => 'string', |
||
141 | 'call_to_action_clicks' => 'unsigned int', |
||
142 | 'campaign_id' => 'string', |
||
143 | 'campaign_name' => 'string', |
||
144 | 'canvas_avg_view_percent' => 'float', |
||
145 | 'canvas_avg_view_time' => 'float', |
||
146 | 'clicks' => 'unsigned int', |
||
147 | 'cost_per_10_sec_video_view' => 'list<AdsActionStats>', |
||
148 | 'cost_per_action_type' => 'list<AdsActionStats>', |
||
149 | 'cost_per_estimated_ad_recallers' => 'float', |
||
150 | 'cost_per_inline_link_click' => 'float', |
||
151 | 'cost_per_inline_post_engagement' => 'float', |
||
152 | 'cost_per_total_action' => 'float', |
||
153 | 'cost_per_unique_action_type' => 'list<AdsActionStats>', |
||
154 | 'cost_per_unique_click' => 'float', |
||
155 | 'cost_per_unique_inline_link_click' => 'float', |
||
156 | 'country' => 'string', |
||
157 | 'cpc' => 'float', |
||
158 | 'cpm' => 'float', |
||
159 | 'cpp' => 'float', |
||
160 | 'ctr' => 'float', |
||
161 | 'date_start' => 'string', |
||
162 | 'date_stop' => 'string', |
||
163 | 'deeplink_clicks' => 'unsigned int', |
||
164 | 'estimated_ad_recall_rate' => 'float', |
||
165 | 'estimated_ad_recallers' => 'unsigned int', |
||
166 | 'frequency' => 'float', |
||
167 | 'frequency_value' => 'string', |
||
168 | 'gender' => 'string', |
||
169 | 'hourly_stats_aggregated_by_advertiser_time_zone' => 'string', |
||
170 | 'hourly_stats_aggregated_by_audience_time_zone' => 'string', |
||
171 | 'impression_device' => 'string', |
||
172 | 'impressions' => 'string', |
||
173 | 'inline_link_click_ctr' => 'float', |
||
174 | 'inline_link_clicks' => 'unsigned int', |
||
175 | 'inline_post_engagement' => 'unsigned int', |
||
176 | 'newsfeed_avg_position' => 'float', |
||
177 | 'newsfeed_clicks' => 'unsigned int', |
||
178 | 'newsfeed_impressions' => 'unsigned int', |
||
179 | 'objective' => 'string', |
||
180 | 'place_page_id' => 'string', |
||
181 | 'place_page_name' => 'string', |
||
182 | 'placement' => 'string', |
||
183 | 'product_id' => 'string', |
||
184 | 'reach' => 'unsigned int', |
||
185 | 'region' => 'string', |
||
186 | 'relevance_score' => 'AdgroupRelevanceScore', |
||
187 | 'social_clicks' => 'unsigned int', |
||
188 | 'social_impressions' => 'Object', |
||
189 | 'social_reach' => 'unsigned int', |
||
190 | 'social_spend' => 'float', |
||
191 | 'spend' => 'float', |
||
192 | 'total_action_value' => 'float', |
||
193 | 'total_actions' => 'unsigned int', |
||
194 | 'total_unique_actions' => 'unsigned int', |
||
195 | 'unique_actions' => 'list<AdsActionStats>', |
||
196 | 'unique_clicks' => 'unsigned int', |
||
197 | 'unique_ctr' => 'float', |
||
198 | 'unique_impressions' => 'unsigned int', |
||
199 | 'unique_inline_link_click_ctr' => 'float', |
||
200 | 'unique_inline_link_clicks' => 'unsigned int', |
||
201 | 'unique_link_clicks_ctr' => 'float', |
||
202 | 'unique_social_clicks' => 'unsigned int', |
||
203 | 'unique_social_impressions' => 'unsigned int', |
||
204 | 'video_10_sec_watched_actions' => 'list<AdsActionStats>', |
||
205 | 'video_15_sec_watched_actions' => 'list<AdsActionStats>', |
||
206 | 'video_30_sec_watched_actions' => 'list<AdsActionStats>', |
||
207 | 'video_avg_pct_watched_actions' => 'list<AdsActionStats>', |
||
208 | 'video_avg_sec_watched_actions' => 'list<AdsActionStats>', |
||
209 | 'video_complete_watched_actions' => 'list<AdsActionStats>', |
||
210 | 'video_p100_watched_actions' => 'list<AdsActionStats>', |
||
211 | 'video_p25_watched_actions' => 'list<AdsActionStats>', |
||
212 | 'video_p50_watched_actions' => 'list<AdsActionStats>', |
||
213 | 'video_p75_watched_actions' => 'list<AdsActionStats>', |
||
214 | 'video_p95_watched_actions' => 'list<AdsActionStats>', |
||
215 | 'website_clicks' => 'unsigned int', |
||
216 | 'website_ctr' => 'list<AdsActionStats>', |
||
217 | ); |
||
218 | } |
||
219 | } |
||
220 |