Code Duplication    Length = 7-13 lines in 4 locations

classes/PodsAPI.php 1 location

@@ 8553-8559 (lines=7) @@
8550
     *
8551
     * @since 2.0
8552
     */
8553
    private function do_hook () {
8554
        $args = func_get_args();
8555
        if ( empty( $args ) )
8556
            return false;
8557
        $name = array_shift( $args );
8558
        return pods_do_hook( "api", $name, $args, $this );
8559
    }
8560
8561
    /**
8562
     * Handle variables that have been deprecated

classes/PodsUI.php 1 location

@@ 5270-5282 (lines=13) @@
5267
	/**
5268
	 * @return array|bool|mixed|null
5269
	 */
5270
	private function do_hook() {
5271
5272
		$args = func_get_args();
5273
5274
		if ( empty( $args ) ) {
5275
			return false;
5276
		}
5277
5278
		$name = array_shift( $args );
5279
5280
		return pods_do_hook( 'ui', $name, $args, $this );
5281
5282
	}
5283
}
5284

classes/PodsData.php 1 location

@@ 3447-3456 (lines=10) @@
3444
	 *
3445
	 * @since 2.0
3446
	 */
3447
	private static function do_hook() {
3448
3449
		$args = func_get_args();
3450
3451
		if ( empty( $args ) ) {
3452
			return false;
3453
		}
3454
3455
		$name = array_shift( $args );
3456
3457
		return pods_do_hook( 'data', $name, $args );
3458
	}
3459

classes/Pods.php 1 location

@@ 4469-4481 (lines=13) @@
4466
	 *
4467
	 * @since 2.0
4468
	 */
4469
	private function do_hook( $name ) {
4470
4471
		$args = func_get_args();
4472
4473
		if ( empty( $args ) ) {
4474
			return false;
4475
		}
4476
4477
		// Remove first argument.
4478
		array_shift( $args );
4479
4480
		return pods_do_hook( 'pods', $name, $args, $this );
4481
	}
4482
4483
	/**
4484
	 * Handle variables that have been deprecated and PodsData vars