Code Duplication    Length = 9-9 lines in 2 locations

application/models/Site_Model.php 2 locations

@@ 221-229 (lines=9) @@
218
		return $success;
219
	}
220
221
	public function getChapterData(string $title_string, string $chapter) : array {
222
		//$title_string isn't used here.
223
224
		$chapter_parts = explode(':--:', $chapter);
225
		return [
226
			'url'    => "http://bato.to/reader#" . $chapter_parts[0],
227
			'number' => $chapter_parts[1]
228
		];
229
	}
230
231
	public function getTitleData(string $title_string) {
232
		$title_parts = explode(':--:', $title_string);
@@ 618-626 (lines=9) @@
615
		return $success;
616
	}
617
618
	public function getChapterData(string $title_url, string $chapter) : array {
619
		$chapter_parts = explode(':--:', $chapter);
620
621
		return [
622
			'url'    => "http://kissmanga.com/Manga/{$title_url}/{$chapter_parts[0]}?id={$chapter_parts[1]}",
623
			//FIXME: KM has an extremely inconsistant chapter format which makes it difficult to parse.
624
			'number' => /*preg_replace('/--.*?$/', '', */$chapter_parts[0]/*)*/
625
		];
626
	}
627
628
	public function getTitleData(string $title_url) {
629
		$titleData = [];