Code Duplication    Length = 23-23 lines in 6 locations

application/models/Site_Model.php 6 locations

@@ 1078-1100 (lines=23) @@
1075
1076
/*** FoolSlide sites ***/
1077
1078
class KireiCake extends Site_Model {
1079
	public $site          = 'KireiCake';
1080
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1081
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1082
1083
	public function getFullTitleURL(string $title_url) : string {
1084
		return "https://reader.kireicake.com/series/{$title_url}";
1085
	}
1086
1087
	public function getChapterData(string $title_url, string $chapter) : array {
1088
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1089
		$chapter_parts = explode('/', $chapter);
1090
		return [
1091
			'url'    => "https://reader.kireicake.com/read/{$title_url}/{$chapter}/",
1092
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1093
		];
1094
	}
1095
1096
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1097
		$fullURL = $this->getFullTitleURL($title_url);
1098
		return $this->parseFoolSlide($fullURL, $title_url);
1099
	}
1100
}
1101
1102
class SeaOtterScans extends Site_Model {
1103
	public $site          = 'SeaOtterScans';
@@ 1102-1124 (lines=23) @@
1099
	}
1100
}
1101
1102
class SeaOtterScans extends Site_Model {
1103
	public $site          = 'SeaOtterScans';
1104
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1105
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1106
1107
	public function getFullTitleURL(string $title_url) : string {
1108
		return "https://reader.seaotterscans.com/series/{$title_url}";
1109
	}
1110
1111
	public function getChapterData(string $title_url, string $chapter) : array {
1112
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1113
		$chapter_parts = explode('/', $chapter);
1114
		return [
1115
			'url'    => "https://reader.seaotterscans.com/read/{$title_url}/{$chapter}/",
1116
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1117
		];
1118
	}
1119
1120
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1121
		$fullURL = $this->getFullTitleURL($title_url);
1122
		return $this->parseFoolSlide($fullURL, $title_url);
1123
	}
1124
}
1125
1126
class HelveticaScans extends Site_Model {
1127
	public $site          = 'HelveticaScans';
@@ 1126-1148 (lines=23) @@
1123
	}
1124
}
1125
1126
class HelveticaScans extends Site_Model {
1127
	public $site          = 'HelveticaScans';
1128
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1129
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1130
1131
	public function getFullTitleURL(string $title_url) : string {
1132
		return "http://helveticascans.com/reader/series/{$title_url}";
1133
	}
1134
1135
	public function getChapterData(string $title_url, string $chapter) : array {
1136
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1137
		$chapter_parts = explode('/', $chapter);
1138
		return [
1139
			'url'    => "http://helveticascans.com/reader/read/{$title_url}/{$chapter}/",
1140
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1141
		];
1142
	}
1143
1144
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1145
		$fullURL = $this->getFullTitleURL($title_url);
1146
		return $this->parseFoolSlide($fullURL, $title_url);
1147
	}
1148
}
1149
1150
class SenseScans extends Site_Model {
1151
	public $site          = 'SenseScans';
@@ 1150-1172 (lines=23) @@
1147
	}
1148
}
1149
1150
class SenseScans extends Site_Model {
1151
	public $site          = 'SenseScans';
1152
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1153
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1154
1155
	public function getFullTitleURL(string $title_url) : string {
1156
		return "http://reader.sensescans.com/series/{$title_url}";
1157
	}
1158
1159
	public function getChapterData(string $title_url, string $chapter) : array {
1160
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1161
		$chapter_parts = explode('/', $chapter);
1162
		return [
1163
			'url'    => "http://reader.sensescans.com/read/{$title_url}/{$chapter}/",
1164
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1165
		];
1166
	}
1167
1168
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1169
		$fullURL = $this->getFullTitleURL($title_url);
1170
		return $this->parseFoolSlide($fullURL, $title_url);
1171
	}
1172
}
1173
1174
class JaiminisBox extends Site_Model {
1175
	public $site          = 'JaiminisBox';
@@ 1174-1196 (lines=23) @@
1171
	}
1172
}
1173
1174
class JaiminisBox extends Site_Model {
1175
	public $site          = 'JaiminisBox';
1176
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1177
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1178
1179
	public function getFullTitleURL(string $title_url) : string {
1180
		return "https://jaiminisbox.com/reader/series/{$title_url}";
1181
	}
1182
1183
	public function getChapterData(string $title_url, string $chapter) : array {
1184
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1185
		$chapter_parts = explode('/', $chapter);
1186
		return [
1187
			'url'    => "https://jaiminisbox.com/reader/read/{$title_url}/{$chapter}/",
1188
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1189
		];
1190
	}
1191
1192
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1193
		$fullURL = $this->getFullTitleURL($title_url);
1194
		return $this->parseFoolSlide($fullURL, $title_url);
1195
	}
1196
}
1197
1198
class DokiFansubs extends Site_Model {
1199
	public $site          = 'DokiFansubs';
@@ 1198-1220 (lines=23) @@
1195
	}
1196
}
1197
1198
class DokiFansubs extends Site_Model {
1199
	public $site          = 'DokiFansubs';
1200
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1201
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1202
1203
	public function getFullTitleURL(string $title_url) : string {
1204
		return "https://kobato.hologfx.com/reader/series/{$title_url}";
1205
	}
1206
1207
	public function getChapterData(string $title_url, string $chapter) : array {
1208
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1209
		$chapter_parts = explode('/', $chapter);
1210
		return [
1211
			'url'    => "https://kobato.hologfx.com/reader/read/{$title_url}/{$chapter}/",
1212
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1213
		];
1214
	}
1215
1216
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1217
		$fullURL = $this->getFullTitleURL($title_url);
1218
		return $this->parseFoolSlide($fullURL, $title_url);
1219
	}
1220
}
1221