Code Duplication    Length = 13-13 lines in 2 locations

includes/class-give-db-meta.php 2 locations

@@ 407-419 (lines=13) @@
404
	 */
405
	public function __call( $name, $arguments ) {
406
		switch ( $name ) {
407
			case '__add_meta':
408
				$this->check = $arguments[0];
409
				$id          = $arguments[1];
410
				$meta_key    = $arguments[2];
411
				$meta_value  = $arguments[3];
412
				$unique      = $arguments[4];
413
414
				// Bailout.
415
				if ( ! $this->is_valid_post_type( $id ) ) {
416
					return $this->check;
417
				}
418
419
				return $this->add_meta( $id, $meta_key, $meta_value, $unique );
420
421
			case '__get_meta':
422
				$this->check = $arguments[0];
@@ 449-461 (lines=13) @@
446
447
				return $this->update_meta( $id, $meta_key, $meta_value );
448
449
			case '__delete_meta':
450
				$this->check = $arguments[0];
451
				$id          = $arguments[1];
452
				$meta_key    = $arguments[2];
453
				$meta_value  = $arguments[3];
454
				$delete_all  = $arguments[3];
455
456
				// Bailout.
457
				if ( ! $this->is_valid_post_type( $id ) ) {
458
					return $this->check;
459
				}
460
461
				return $this->delete_meta( $id, $meta_key, $meta_value, $delete_all );
462
		}
463
	}
464
}