Code Duplication    Length = 12-15 lines in 2 locations

build/integration/features/bootstrap/Sharing.php 2 locations

@@ 217-231 (lines=15) @@
214
215
		if (count($data->element) > 0){
216
			foreach($data as $element) {
217
				if ($contentExpected == "A_TOKEN"){
218
					return (strlen((string)$element->$field) == 15);
219
				}
220
				elseif ($contentExpected == "A_NUMBER"){
221
					return is_numeric((string)$element->$field);
222
				}
223
				elseif($contentExpected == "AN_URL"){
224
					return $this->isExpectedUrl((string)$element->$field, "index.php/s/");
225
				}
226
				elseif ((string)$element->$field == $contentExpected){
227
					return True;
228
				}
229
				else{
230
					print($element->$field);
231
				}
232
			}
233
234
			return False;
@@ 236-247 (lines=12) @@
233
234
			return False;
235
		} else {
236
			if ($contentExpected == "A_TOKEN"){
237
					return (strlen((string)$data->$field) == 15);
238
			}
239
			elseif ($contentExpected == "A_NUMBER"){
240
					return is_numeric((string)$data->$field);
241
			}
242
			elseif($contentExpected == "AN_URL"){
243
					return $this->isExpectedUrl((string)$data->$field, "index.php/s/");
244
			}
245
			elseif ($data->$field == $contentExpected){
246
					return True;
247
			}
248
			return False;
249
		}
250
	}