Code Duplication    Length = 16-16 lines in 2 locations

classes/Pods.php 2 locations

@@ 3276-3291 (lines=16) @@
3273
	 * @since 2.0
3274
	 * @link  https://pods.io/docs/delete/
3275
	 */
3276
	public function delete( $id = null ) {
3277
3278
		if ( null === $id ) {
3279
			$id = $this->id();
3280
		}
3281
3282
		$id = (int) $this->do_hook( 'delete', $id );
3283
3284
		if ( empty( $id ) ) {
3285
			return false;
3286
		}
3287
3288
		$params = array(
3289
			'pod' => $this->pod,
3290
			'id'  => $id,
3291
		);
3292
3293
		return $this->api->delete_pod_item( $params );
3294
	}
@@ 3331-3346 (lines=16) @@
3328
	 * @since 2.0
3329
	 * @link  https://pods.io/docs/duplicate/
3330
	 */
3331
	public function duplicate( $id = null ) {
3332
3333
		if ( null === $id ) {
3334
			$id = $this->id();
3335
		}
3336
3337
		$id = (int) $this->do_hook( 'duplicate', $id );
3338
3339
		if ( empty( $id ) ) {
3340
			return false;
3341
		}
3342
3343
		$params = array(
3344
			'pod' => $this->pod,
3345
			'id'  => $id,
3346
		);
3347
3348
		return $this->api->duplicate_pod_item( $params );
3349
	}