Code Duplication    Length = 20-20 lines in 2 locations

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

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

includes/class-marker-model.php 1 location

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