Code Duplication    Length = 8-8 lines in 2 locations

application/models/Tracker_Model.php 2 locations

@@ 492-499 (lines=8) @@
489
		 */
490
		$status = ['code' => 0];
491
492
		foreach($idList as $id) {
493
			if(!(ctype_digit($id) && $this->deleteTrackerByID($this->User->id, (int) $id))) {
494
				$status['code'] = 1;
495
			} else {
496
				//Delete was successful, update history too.
497
				$this->History->userRemoveTitle((int) $id);
498
			}
499
		}
500
501
		return $status;
502
	}
@@ 513-520 (lines=8) @@
510
		$status = ['code' => 0];
511
512
		if(in_array($category, array_keys($this->enabledCategories))) {
513
			foreach($idList as $id) {
514
				if(!(ctype_digit($id) && $this->setCategoryTrackerByID($this->User->id, (int) $id, $category))) {
515
					$status['code'] = 1;
516
				} else {
517
					//Category update was successful, update history too.
518
					$this->History->userUpdateCategory((int) $id, $category);
519
				}
520
			}
521
		} else {
522
			$status['code'] = 2;
523
		}