Code Duplication    Length = 18-18 lines in 2 locations

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

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

includes/class-marker-model.php 1 location

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