Code Duplication    Length = 7-7 lines in 3 locations

modules/greatschools/wp-greatschools-api.php 3 locations

@@ 127-133 (lines=7) @@
124
		 * @param mixed $query_string Query String.
125
		 * @return void
126
		 */
127
		public function search_for_schools( $state, $query_string, $level_code, $sort, $limit ) {
128
			$request = $this->base_uri . '/search/schools?key=' . static::$api_key . '&state=' . $state . '&q='. $query_string .'&levelCode='. $level_code .'&sort='. $sort .'&limit=' . $limit;
129
			$xml = simplexml_load_file( $request );
130
			$json = wp_json_encode( $xml );
131
			$results = json_decode( $json, true );
132
			return $results;
133
		}
134
		/**
135
		 * Returns a list of the most recent reviews for a school or for any schools in a city.
136
		 *
@@ 146-152 (lines=7) @@
143
		 * @param mixed $topic_id Topic ID.
144
		 * @return void
145
		 */
146
		public function get_school_reviews( $state, $city, $school_id, $cutoffage, $limit, $topic_id ) {
147
			$request = $this->base_uri . '/reviews/school/' . $state . '/'. $school_id .'?key=' . static::$api_key . '&limit='. $limit .'&cutoffAge='. $cutoffage .'&topicId=' . $topic_id;
148
			$xml = simplexml_load_file( $request );
149
			$json = wp_json_encode( $xml );
150
			$results = json_decode( $json, true );
151
			return $results;
152
		}
153
		/**
154
		 * Returns a list of topics available for topical reviews.
155
		 *
@@ 221-227 (lines=7) @@
218
		 * @param mixed $sort Sort.
219
		 * @return void
220
		 */
221
		public function get_nearby_cities( $state, $city, $radius, $sort = 'rating' ) {
222
			$request = $this->base_uri . '/cities/nearby/' . $state . '/'. $city .'?key=' . static::$api_key . '&radius='. $radius .'&sort=' . $sort;
223
			$xml = simplexml_load_file( $request );
224
			$json = wp_json_encode( $xml );
225
			$results = json_decode( $json, true );
226
			return $results;
227
		}
228
		/**
229
		 * get_districts function.
230
		 *