Code Duplication    Length = 20-20 lines in 2 locations

includes/class-info-window-model.php 1 location

@@ 52-71 (lines=20) @@
49
	 *
50
	 * @return mixed|null
51
	 */
52
	function __call( $method_name, $args ) {
53
54
		$value = null;
55
56
		do {
57
			$value = parent::__call( $method_name, $args );
58
59
			if ( $value ) {
60
				break;
61
			}
62
63
			if ( $this->has_info_window() ) {
64
				$value = call_user_func_array( array( $this->info_window(), $method_name ), $args );
65
				break;
66
			}
67
		} while ( false );
68
69
		return $value;
70
71
	}
72
73
}
74

includes/class-marker-model.php 1 location

@@ 61-80 (lines=20) @@
58
	 *
59
	 * @return mixed|null
60
	 */
61
	function __call( $method_name, $args ) {
62
63
		$value = null;
64
65
		do {
66
			$value = parent::__call( $method_name, $args );
67
68
			if ( $value ) {
69
				break;
70
			}
71
72
			if ( $this->has_marker() ) {
73
				$value = call_user_func_array( array( $this->marker(), $method_name ), $args );
74
				break;
75
			}
76
		} while ( false );
77
78
		return $value;
79
80
	}
81
82
}
83