Conditions | 1 |
Paths | 1 |
Total Lines | 88 |
Code Lines | 86 |
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 |
||
125 | public function getFieldTypes() { |
||
126 | return array( |
||
127 | 'adgroup_id' => 'string', |
||
128 | 'age_max' => 'unsigned int', |
||
129 | 'age_min' => 'unsigned int', |
||
130 | 'app_install_state' => 'string', |
||
131 | 'audience_network_positions' => 'list<string>', |
||
132 | 'behaviors' => 'list<IDName>', |
||
133 | 'cities' => 'list<IDName>', |
||
134 | 'college_years' => 'list<unsigned int>', |
||
135 | 'connections' => 'list<IDName>', |
||
136 | 'contextual_targeting_categories' => 'list<IDName>', |
||
137 | 'countries' => 'list<string>', |
||
138 | 'country' => 'list<string>', |
||
139 | 'country_groups' => 'list<string>', |
||
140 | 'custom_audiences' => 'list<IDName>', |
||
141 | 'device_platforms' => 'list<DevicePlatforms>', |
||
142 | 'direct_install_devices' => 'bool', |
||
143 | 'dynamic_audience_ids' => 'list<string>', |
||
144 | 'education_majors' => 'list<IDName>', |
||
145 | 'education_schools' => 'list<IDName>', |
||
146 | 'education_statuses' => 'list<unsigned int>', |
||
147 | 'effective_audience_network_positions' => 'list<string>', |
||
148 | 'effective_device_platforms' => 'list<EffectiveDevicePlatforms>', |
||
149 | 'effective_facebook_positions' => 'list<string>', |
||
150 | 'effective_instagram_positions' => 'list<string>', |
||
151 | 'effective_messenger_positions' => 'list<string>', |
||
152 | 'effective_publisher_platforms' => 'list<string>', |
||
153 | 'engagement_specs' => 'list<TargetingDynamicRule>', |
||
154 | 'ethnic_affinity' => 'list<IDName>', |
||
155 | 'exclude_reached_since' => 'list<string>', |
||
156 | 'excluded_connections' => 'list<IDName>', |
||
157 | 'excluded_custom_audiences' => 'list<IDName>', |
||
158 | 'excluded_dynamic_audience_ids' => 'list<string>', |
||
159 | 'excluded_engagement_specs' => 'list<TargetingDynamicRule>', |
||
160 | 'excluded_geo_locations' => 'TargetingGeoLocation', |
||
161 | 'excluded_mobile_device_model' => 'list<string>', |
||
162 | 'excluded_product_audience_specs' => 'list<TargetingProductAudienceSpec>', |
||
163 | 'excluded_publisher_categories' => 'list<string>', |
||
164 | 'excluded_publisher_list_ids' => 'list<string>', |
||
165 | 'excluded_user_device' => 'list<string>', |
||
166 | 'exclusions' => 'FlexibleTargeting', |
||
167 | 'facebook_positions' => 'list<string>', |
||
168 | 'family_statuses' => 'list<IDName>', |
||
169 | 'fb_deal_id' => 'string', |
||
170 | 'flexible_spec' => 'list<FlexibleTargeting>', |
||
171 | 'friends_of_connections' => 'list<IDName>', |
||
172 | 'genders' => 'list<unsigned int>', |
||
173 | 'generation' => 'list<IDName>', |
||
174 | 'geo_locations' => 'TargetingGeoLocation', |
||
175 | 'home_ownership' => 'list<IDName>', |
||
176 | 'home_type' => 'list<IDName>', |
||
177 | 'home_value' => 'list<IDName>', |
||
178 | 'household_composition' => 'list<IDName>', |
||
179 | 'income' => 'list<IDName>', |
||
180 | 'industries' => 'list<IDName>', |
||
181 | 'instagram_positions' => 'list<string>', |
||
182 | 'interested_in' => 'list<unsigned int>', |
||
183 | 'interests' => 'list<IDName>', |
||
184 | 'keywords' => 'list<string>', |
||
185 | 'life_events' => 'list<IDName>', |
||
186 | 'locales' => 'list<unsigned int>', |
||
187 | 'messenger_positions' => 'list<string>', |
||
188 | 'moms' => 'list<IDName>', |
||
189 | 'net_worth' => 'list<IDName>', |
||
190 | 'office_type' => 'list<IDName>', |
||
191 | 'place_page_set_ids' => 'list<string>', |
||
192 | 'political_views' => 'list<unsigned int>', |
||
193 | 'politics' => 'list<IDName>', |
||
194 | 'product_audience_specs' => 'list<TargetingProductAudienceSpec>', |
||
195 | 'publisher_platforms' => 'list<string>', |
||
196 | 'publisher_visibility_categories' => 'list<string>', |
||
197 | 'radius' => 'string', |
||
198 | 'regions' => 'list<IDName>', |
||
199 | 'relationship_statuses' => 'list<unsigned int>', |
||
200 | 'rtb_flag' => 'bool', |
||
201 | 'site_category' => 'list<string>', |
||
202 | 'targeting_optimization' => 'string', |
||
203 | 'user_adclusters' => 'list<IDName>', |
||
204 | 'user_device' => 'list<string>', |
||
205 | 'user_event' => 'list<unsigned int>', |
||
206 | 'user_os' => 'list<string>', |
||
207 | 'wireless_carrier' => 'list<string>', |
||
208 | 'work_employers' => 'list<IDName>', |
||
209 | 'work_positions' => 'list<IDName>', |
||
210 | 'zips' => 'list<string>', |
||
211 | ); |
||
212 | } |
||
213 | } |
||
214 |