| Conditions | 1 |
| Paths | 1 |
| Total Lines | 121 |
| Code Lines | 2 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
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 |
||
| 77 | private function getFirstPageJson() |
||
| 78 | { |
||
| 79 | return '{ |
||
| 80 | "html_attributions" : [], |
||
| 81 | "next_page_token" : "CpQCAgEAAFxg8o-eU7_uKn7Yqjana-HQIx1hr5BrT4zBaEko29ANsXtp9mrqN0yrKWhf-y2PUpHRLQb1GT-mtxNcXou8TwkXhi1Jbk-ReY7oulyuvKSQrw1lgJElggGlo0d6indiH1U-tDwquw4tU_UXoQ_sj8OBo8XBUuWjuuFShqmLMP-0W59Vr6CaXdLrF8M3wFR4dUUhSf5UC4QCLaOMVP92lyh0OdtF_m_9Dt7lz-Wniod9zDrHeDsz_by570K3jL1VuDKTl_U1cJ0mzz_zDHGfOUf7VU1kVIs1WnM9SGvnm8YZURLTtMLMWx8-doGUE56Af_VfKjGDYW361OOIj9GmkyCFtaoCmTMIr5kgyeUSnB-IEhDlzujVrV6O9Mt7N4DagR6RGhT3g1viYLS4kO5YindU6dm3GIof1Q", |
||
| 82 | "results" : [ |
||
| 83 | { |
||
| 84 | "geometry" : { |
||
| 85 | "location" : { |
||
| 86 | "lat" : -33.870775, |
||
| 87 | "lng" : 151.199025 |
||
| 88 | } |
||
| 89 | }, |
||
| 90 | "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/travel_agent-71.png", |
||
| 91 | "id" : "foobaz", |
||
| 92 | "name" : "Rhythmboat Cruises", |
||
| 93 | "opening_hours" : { |
||
| 94 | "open_now" : true |
||
| 95 | }, |
||
| 96 | "photos" : [ |
||
| 97 | { |
||
| 98 | "height" : 270, |
||
| 99 | "html_attributions" : [], |
||
| 100 | "photo_reference" : "CnRnAAAAF-LjFR1ZV93eawe1cU_3QNMCNmaGkowY7CnOf-kcNmPhNnPEG9W979jOuJJ1sGr75rhD5hqKzjD8vbMbSsRnq_Ni3ZIGfY6hKWmsOf3qHKJInkm4h55lzvLAXJVc-Rr4kI9O1tmIblblUpg2oqoq8RIQRMQJhFsTr5s9haxQ07EQHxoUO0ICubVFGYfJiMUPor1GnIWb5i8", |
||
| 101 | "width" : 519 |
||
| 102 | } |
||
| 103 | ], |
||
| 104 | "place_id" : "ChIJyWEHuEmuEmsRm9hTkapTCrk", |
||
| 105 | "scope" : "GOOGLE", |
||
| 106 | "alt_ids" : [ |
||
| 107 | { |
||
| 108 | "place_id" : "D9iJyWEHuEmuEmsRm9hTkapTCrk", |
||
| 109 | "scope" : "APP" |
||
| 110 | } |
||
| 111 | ], |
||
| 112 | "reference" : "CoQBdQAAAFSiijw5-cAV68xdf2O18pKIZ0seJh03u9h9wk_lEdG-cP1dWvp_QGS4SNCBMk_fB06YRsfMrNkINtPez22p5lRIlj5ty_HmcNwcl6GZXbD2RdXsVfLYlQwnZQcnu7ihkjZp_2gk1-fWXql3GQ8-1BEGwgCxG-eaSnIJIBPuIpihEhAY1WYdxPvOWsPnb2-nGb6QGhTipN0lgaLpQTnkcMeAIEvCsSa0Ww", |
||
| 113 | "types" : [ "travel_agency", "restaurant", "food", "establishment" ], |
||
| 114 | "vicinity" : "Pyrmont Bay Wharf Darling Dr, Sydney" |
||
| 115 | }, |
||
| 116 | { |
||
| 117 | "geometry" : { |
||
| 118 | "location" : { |
||
| 119 | "lat" : -33.866891, |
||
| 120 | "lng" : 151.200814 |
||
| 121 | } |
||
| 122 | }, |
||
| 123 | "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png", |
||
| 124 | "id" : "45a27fd8d56c56dc62afc9b49e1d850440d5c403", |
||
| 125 | "name" : "Private Charter Sydney Habour Cruise", |
||
| 126 | "photos" : [ |
||
| 127 | { |
||
| 128 | "height" : 426, |
||
| 129 | "html_attributions" : [], |
||
| 130 | "photo_reference" : "CnRnAAAAL3n0Zu3U6fseyPl8URGKD49aGB2Wka7CKDZfamoGX2ZTLMBYgTUshjr-MXc0_O2BbvlUAZWtQTBHUVZ-5Sxb1-P-VX2Fx0sZF87q-9vUt19VDwQQmAX_mjQe7UWmU5lJGCOXSgxp2fu1b5VR_PF31RIQTKZLfqm8TA1eynnN4M1XShoU8adzJCcOWK0er14h8SqOIDZctvU", |
||
| 131 | "width" : 640 |
||
| 132 | } |
||
| 133 | ], |
||
| 134 | "place_id" : "ChIJqwS6fjiuEmsRJAMiOY9MSms", |
||
| 135 | "scope" : "GOOGLE", |
||
| 136 | "reference" : "CpQBhgAAAFN27qR_t5oSDKPUzjQIeQa3lrRpFTm5alW3ZYbMFm8k10ETbISfK9S1nwcJVfrP-bjra7NSPuhaRulxoonSPQklDyB-xGvcJncq6qDXIUQ3hlI-bx4AxYckAOX74LkupHq7bcaREgrSBE-U6GbA1C3U7I-HnweO4IPtztSEcgW09y03v1hgHzL8xSDElmkQtRIQzLbyBfj3e0FhJzABXjM2QBoUE2EnL-DzWrzpgmMEulUBLGrtu2Y", |
||
| 137 | "types" : [ "restaurant", "food", "establishment" ], |
||
| 138 | "vicinity" : "Australia" |
||
| 139 | }, |
||
| 140 | { |
||
| 141 | "geometry" : { |
||
| 142 | "location" : { |
||
| 143 | "lat" : -33.870943, |
||
| 144 | "lng" : 151.190311 |
||
| 145 | } |
||
| 146 | }, |
||
| 147 | "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png", |
||
| 148 | "id" : "30bee58f819b6c47bd24151802f25ecf11df8943", |
||
| 149 | "name" : "Bucks Party Cruise", |
||
| 150 | "opening_hours" : { |
||
| 151 | "open_now" : true |
||
| 152 | }, |
||
| 153 | "photos" : [ |
||
| 154 | { |
||
| 155 | "height" : 600, |
||
| 156 | "html_attributions" : [], |
||
| 157 | "photo_reference" : "CnRnAAAA48AX5MsHIMiuipON_Lgh97hPiYDFkxx_vnaZQMOcvcQwYN92o33t5RwjRpOue5R47AjfMltntoz71hto40zqo7vFyxhDuuqhAChKGRQ5mdO5jv5CKWlzi182PICiOb37PiBtiFt7lSLe1SedoyrD-xIQD8xqSOaejWejYHCN4Ye2XBoUT3q2IXJQpMkmffJiBNftv8QSwF4", |
||
| 158 | "width" : 800 |
||
| 159 | } |
||
| 160 | ], |
||
| 161 | "place_id" : "ChIJLfySpTOuEmsRsc_JfJtljdc", |
||
| 162 | "scope" : "GOOGLE", |
||
| 163 | "reference" : "CoQBdQAAANQSThnTekt-UokiTiX3oUFT6YDfdQJIG0ljlQnkLfWefcKmjxax0xmUpWjmpWdOsScl9zSyBNImmrTO9AE9DnWTdQ2hY7n-OOU4UgCfX7U0TE1Vf7jyODRISbK-u86TBJij0b2i7oUWq2bGr0cQSj8CV97U5q8SJR3AFDYi3ogqEhCMXjNLR1k8fiXTkG2BxGJmGhTqwE8C4grdjvJ0w5UsAVoOH7v8HQ", |
||
| 164 | "types" : [ "restaurant", "food", "establishment" ], |
||
| 165 | "vicinity" : "37 Bank St, Pyrmont" |
||
| 166 | }, |
||
| 167 | { |
||
| 168 | "geometry" : { |
||
| 169 | "location" : { |
||
| 170 | "lat" : -33.867591, |
||
| 171 | "lng" : 151.201196 |
||
| 172 | } |
||
| 173 | }, |
||
| 174 | "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/travel_agent-71.png", |
||
| 175 | "id" : "a97f9fb468bcd26b68a23072a55af82d4b325e0d", |
||
| 176 | "name" : "Australian Cruise Group", |
||
| 177 | "opening_hours" : { |
||
| 178 | "open_now" : true |
||
| 179 | }, |
||
| 180 | "photos" : [ |
||
| 181 | { |
||
| 182 | "height" : 242, |
||
| 183 | "html_attributions" : [], |
||
| 184 | "photo_reference" : "CnRnAAAABjeoPQ7NUU3pDitV4Vs0BgP1FLhf_iCgStUZUr4ZuNqQnc5k43jbvjKC2hTGM8SrmdJYyOyxRO3D2yutoJwVC4Vp_dzckkjG35L6LfMm5sjrOr6uyOtr2PNCp1xQylx6vhdcpW8yZjBZCvVsjNajLBIQ-z4ttAMIc8EjEZV7LsoFgRoU6OrqxvKCnkJGb9F16W57iIV4LuM", |
||
| 185 | "width" : 200 |
||
| 186 | } |
||
| 187 | ], |
||
| 188 | "place_id" : "ChIJrTLr-GyuEmsRBfy61i59si0", |
||
| 189 | "scope" : "GOOGLE", |
||
| 190 | "reference" : "CoQBeQAAAFvf12y8veSQMdIMmAXQmus1zqkgKQ-O2KEX0Kr47rIRTy6HNsyosVl0CjvEBulIu_cujrSOgICdcxNioFDHtAxXBhqeR-8xXtm52Bp0lVwnO3LzLFY3jeo8WrsyIwNE1kQlGuWA4xklpOknHJuRXSQJVheRlYijOHSgsBQ35mOcEhC5IpbpqCMe82yR136087wZGhSziPEbooYkHLn9e5njOTuBprcfVw", |
||
| 191 | "types" : [ "travel_agency", "restaurant", "food", "establishment" ], |
||
| 192 | "vicinity" : "32 The Promenade, King Street Wharf 5, Sydney" |
||
| 193 | } |
||
| 194 | ], |
||
| 195 | "status" : "OK" |
||
| 196 | }'; |
||
| 197 | } |
||
| 198 | |||
| 320 |